Class: ESM::Command::Server::Stuck
- Inherits:
-
ApplicationCommand
- Object
- Base
- ApplicationCommand
- ESM::Command::Server::Stuck
- Defined in:
- lib/esm/command/server/stuck.rb
Defined Under Namespace
Modules: V1
Instance Method Summary collapse
Instance Method Details
#on_execute ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/esm/command/server/stuck.rb', line 23 def on_execute check_for_pending_request! # Create a confirmation request to the requestee add_request( to: current_user, description: I18n.t( "commands.stuck.request_description", user: current_user.mention, server: target_server.server_id ) ) # Remind them to check their PMs = ESM::Embed.build( :success, description: I18n.t("commands.request.check_pm", user: current_user.mention) ) reply() end |
#on_request_accepted ⇒ Object
45 46 47 48 49 50 51 52 53 54 |
# File 'lib/esm/command/server/stuck.rb', line 45 def on_request_accepted query_exile_database!("reset_player", uid: current_user.steam_uid) = ESM::Embed.build( :success, description: I18n.t("commands.stuck.success_message", user: current_user.mention) ) reply() end |