Class: Discorb::ApplicationCommand::Command::SubcommandGroup
- Inherits:
 - 
      GroupCommand
      
        
- Object
 - DiscordModel
 - Discorb::ApplicationCommand::Command
 - GroupCommand
 - Discorb::ApplicationCommand::Command::SubcommandGroup
 
 
- Defined in:
 - lib/discorb/app_command/command.rb
 
Overview
Represents the subcommand group.
Instance Attribute Summary collapse
- 
  
    
      #commands -> Array<Discorb::ApplicationCommand::Command::ChatInputCommand> 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
The subcommands of the command.
 
Attributes inherited from GroupCommand
Attributes inherited from Discorb::ApplicationCommand::Command
#block, #default_permission, #dm_permission, #guild_ids, #name, #type, #type_raw
Instance Method Summary collapse
- 
  
    
      #slash(command_name, description, options = {}, &block) -> Discorb::ApplicationCommand::Command::ChatInputCommand 
    
    
  
  
  
  
  
  
  
  
  
    
Add new subcommand.
 - #to_s -> Object
 
Methods inherited from GroupCommand
Methods inherited from DiscordModel
Instance Attribute Details
#commands -> Array<Discorb::ApplicationCommand::Command::ChatInputCommand> (readonly)
Returns The subcommands of the command.
      420 421 422  | 
    
      # File 'lib/discorb/app_command/command.rb', line 420 def commands @commands end  | 
  
Instance Method Details
#slash(command_name, description, options = {}, &block) -> Discorb::ApplicationCommand::Command::ChatInputCommand
Add new subcommand.
      446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462  | 
    
      # File 'lib/discorb/app_command/command.rb', line 446 def slash(command_name, description, = {}, &block) command = Discorb::ApplicationCommand::Command::ChatInputCommand.new( command_name, description, , [], block, 1, self, nil, nil ) @commands << command @client.callable_commands << command command end  | 
  
#to_s -> Object
      437 438 439  | 
    
      # File 'lib/discorb/app_command/command.rb', line 437 def to_s "#{@parent} #{@name}" end  |