Class: ESM::Command::Base

Inherits:
Object
  • Object
show all
Includes:
Checks, Definition, Helpers, Lifecycle, Migration, Permissions
Defined in:
lib/esm/command/base.rb,
lib/esm/command/base/checks.rb,
lib/esm/command/base/timers.rb,
lib/esm/command/base/helpers.rb,
lib/esm/command/base/lifecycle.rb,
lib/esm/command/base/migration.rb,
lib/esm/command/base/definition.rb,
lib/esm/command/base/permissions.rb

Direct Known Subclasses

ApplicationCommand

Defined Under Namespace

Modules: Checks, Definition, Helpers, Lifecycle, Migration, Permissions Classes: Timers

Constant Summary collapse

DM_CHANNEL_TYPES =
[:dm, :direct_message, :pm, :private_message].freeze
TEXT_CHANNEL_TYPES =
[:text, :text_channel].freeze
CHANNEL_TYPES =
(DM_CHANNEL_TYPES + TEXT_CHANNEL_TYPES).freeze

Instance Attribute Summary

Attributes included from Definition

#category, #cooldown_time, #current_channel, #current_community, #current_user, #event, #name, #permissions, #response, #timers

Method Summary

Methods included from Permissions

#command_allowed?, #command_allowed_in_channel?, #command_allowlist_enabled?, #command_enabled?, #community_permissions?, #cooldown_time, #notify_when_command_disabled?

Methods included from Migration

#deliver!, #discord, #from_server, #load_v1_code!, #on_response, #server, #v1_code_needed?, #v2_target_server?

Methods included from Lifecycle

#from_discord!, #from_request, #on_execute, #on_request_accepted, #on_request_declined

Methods included from Helpers

#accept_request_url, #add_request, #argument?, #call_sqf_function!, #community_permissions, #create_or_update_cooldown, #current_cooldown, #current_cooldown_query, #decline_request_url, #dev_only?, #dm_channel?, #dm_only?, #edit_message, #embed_from_message!, #inspect, #on_cooldown?, #query_exile_database!, #raise_error!, #registration_required?, #reply, #request, #request_url, #same_user?, #send_request_message, #send_to_target_server!, #skip_action, #t, #target_community, #target_server, #target_uid, #target_user, #text_channel?, #text_only?, #to_h, #usage

Methods included from Definition

#initialize

Methods included from Checks

#check_failed!, #check_for_connected_server!, #check_for_cooldown!, #check_for_dev_only!, #check_for_different_community!, #check_for_dm_only!, #check_for_nil_target_community!, #check_for_nil_target_server!, #check_for_nil_target_user!, #check_for_owned_server!, #check_for_owner!, #check_for_pending_request!, #check_for_permissions!, #check_for_player_mode!, #check_for_registered!, #check_for_registered_target_user!, #check_for_text_only!