Class: Discorb::ApplicationCommand::Command::SubcommandGroup
- Inherits:
-
GroupCommand
- Object
- DiscordModel
- Discorb::ApplicationCommand::Command
- GroupCommand
- Discorb::ApplicationCommand::Command::SubcommandGroup
- Defined in:
- lib/discorb/app_command.rb
Overview
Represents the subcommand group.
Instance Attribute Summary collapse
-
#commands -> Array<Discorb::ApplicationCommand::Command::SlashCommand>
readonly
The subcommands of the command.
Attributes inherited from GroupCommand
Attributes inherited from Discorb::ApplicationCommand::Command
#block, #guild_ids, #id_map, #name, #type, #type_raw
Instance Method Summary collapse
-
#slash(command_name, description, options = {}, &block) -> Discorb::ApplicationCommand::Command::SlashCommand
Add new subcommand.
- #to_s -> Object
Methods inherited from GroupCommand
Methods inherited from DiscordModel
Instance Attribute Details
#commands -> Array<Discorb::ApplicationCommand::Command::SlashCommand> (readonly)
Returns The subcommands of the command.
395 396 397 |
# File 'lib/discorb/app_command.rb', line 395 def commands @commands end |
Instance Method Details
#slash(command_name, description, options = {}, &block) -> Discorb::ApplicationCommand::Command::SlashCommand
Add new subcommand.
414 415 416 417 418 419 |
# File 'lib/discorb/app_command.rb', line 414 def slash(command_name, description, = {}, &block) command = Discorb::ApplicationCommand::Command::SlashCommand.new(command_name, description, , [], block, 1, @parent + " " + @name) @commands << command @client.bottom_commands << command command end |
#to_s -> Object
405 406 407 |
# File 'lib/discorb/app_command.rb', line 405 def to_s @parent + " " + @name end |