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

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

Overview

Represents the slash command.

Instance Attribute Summary collapse

Attributes inherited from Discorb::ApplicationCommand::Command

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

Instance Method Summary collapse

Methods inherited from DiscordModel

#==, #eql?, #hash

Instance Attribute Details

#description -> String (readonly)

Returns The description of the command.

Returns:

  • (String)

    The description of the command.



199
200
201
# File 'lib/discorb/app_command.rb', line 199

def description
  @description
end

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

Returns The options of the command.

Returns:

  • (Hash{String => Hash})

    The options of the command.



201
202
203
# File 'lib/discorb/app_command.rb', line 201

def options
  @options
end

Instance Method Details

#to_s -> String

Returns the commands name.

Returns:

  • (String)

    The name of the command.



218
219
220
# File 'lib/discorb/app_command.rb', line 218

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