Class: ESM::Command::Server::Territories
- Inherits:
-
ApplicationCommand
- Object
- Base
- ApplicationCommand
- ESM::Command::Server::Territories
- Defined in:
- lib/esm/command/server/territories.rb
Defined Under Namespace
Modules: V1
Instance Method Summary collapse
Instance Method Details
#on_execute ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/esm/command/server/territories.rb', line 26 def on_execute territories = query_exile_database!("player_territories", uid: current_user.steam_uid) if territories.size == 0 raise_error!( :no_territories, user: current_user.mention, server_id: target_server.server_id ) end territories.each do |territory| = ESM::Exile::Territory.new( server: target_server, territory: territory.to_h ). reply() end end |