Class: Discorb::Command::Command Abstract
- Inherits:
-
DiscordModel
- Object
- DiscordModel
- Discorb::Command::Command
- Defined in:
- lib/discorb/command.rb
Overview
This class is abstract.
Represents a application command.
Direct Known Subclasses
Defined Under Namespace
Classes: GroupCommand, SlashCommand, SubcommandGroup
Instance Attribute Summary collapse
-
#block -> Proc
readonly
The block of the command.
-
#guild_ids -> Array<#to_s>
readonly
The guild ids that the command is enabled in.
-
#id_map -> Discorb::Dictionary{Discorb::Snowflake, :global => Discorb::Snowflake}
readonly
The ID mapping.
-
#name -> String
readonly
The name of the command.
-
#type -> :chat_input, ...
readonly
The type of the command.
-
#type_raw -> Integer
readonly
The raw type of the command.
Method Summary
Methods inherited from DiscordModel
Instance Attribute Details
#block -> Proc (readonly)
Returns The block of the command.
127 128 129 |
# File 'lib/discorb/command.rb', line 127 def block @block end |
#guild_ids -> Array<#to_s> (readonly)
Returns The guild ids that the command is enabled in.
125 126 127 |
# File 'lib/discorb/command.rb', line 125 def guild_ids @guild_ids end |
#id_map -> Discorb::Dictionary{Discorb::Snowflake, :global => Discorb::Snowflake} (readonly)
Returns The ID mapping.
133 134 135 |
# File 'lib/discorb/command.rb', line 133 def id_map @id_map end |
#name -> String (readonly)
Returns The name of the command.
123 124 125 |
# File 'lib/discorb/command.rb', line 123 def name @name end |
#type -> :chat_input, ... (readonly)
Returns The type of the command.
129 130 131 |
# File 'lib/discorb/command.rb', line 129 def type @type end |
#type_raw -> Integer (readonly)
Returns The raw type of the command.
131 132 133 |
# File 'lib/discorb/command.rb', line 131 def type_raw @type_raw end |