Class: Discorb::Command::Command::SlashCommand

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

Overview

Represents the slash command.

Instance Attribute Summary collapse

Attributes inherited from Discorb::Command::Command

#block, #guild_ids, #id_map, #name, #type, #type_raw

Instance Method Summary collapse

Methods inherited from DiscordModel

#==, #eql?, #hash

Instance Attribute Details

#descriptionString (readonly)

Returns The description of the command.

Returns:

  • (String)

    The description of the command.



167
168
169
# File 'lib/discorb/command.rb', line 167

def description
  @description
end

#optionsHash{String => Hash} (readonly)

Returns The options of the command.

Returns:

  • (Hash{String => Hash})

    The options of the command.



169
170
171
# File 'lib/discorb/command.rb', line 169

def options
  @options
end

Instance Method Details

#to_sString

Returns the commands name.

Returns:

  • (String)

    The name of the command.



189
190
191
# File 'lib/discorb/command.rb', line 189

def to_s
  (@parent + " " + @name).strip
end