Class: Discorb::ApplicationCommand::Command::ChatInputCommand

Inherits:
Discorb::ApplicationCommand::Command show all
Defined in:
lib/discorb/app_command/command.rb

Overview

Represents the slash command.

Instance Attribute Summary collapse

Attributes inherited from Discorb::ApplicationCommand::Command

#block, #default_permission, #dm_permission, #guild_ids, #name, #type, #type_raw

Instance Method Summary collapse

Methods inherited from DiscordModel

#==, #eql?, #inspect

Instance Attribute Details

#description -> Hash{String => String} (readonly)

Returns The description of the command.

Returns:

  • (Hash{String => String})

    The description of the command.



88
89
90
# File 'lib/discorb/app_command/command.rb', line 88

def description
  @description
end

#options -> Hash{String => Hash} (readonly)

Returns The options of the command.

Returns:

  • (Hash{String => Hash})

    The options of the command.



90
91
92
# File 'lib/discorb/app_command/command.rb', line 90

def options
  @options
end

Instance Method Details

#to_s -> String

Returns the commands name.

Returns:

  • (String)

    The name of the command.



126
127
128
# File 'lib/discorb/app_command/command.rb', line 126

def to_s
  "#{@parent} #{@name["default"]}".strip
end