Class: Discorb::ApplicationCommand::Command Abstract

Inherits:
DiscordModel show all
Defined in:
lib/discorb/app_command/command.rb

Overview

This class is abstract.

Represents a application command.

Direct Known Subclasses

GroupCommand, SlashCommand

Defined Under Namespace

Classes: GroupCommand, SlashCommand, SubcommandGroup

Instance Attribute Summary collapse

Method Summary

Methods inherited from DiscordModel

#==, #eql?, #inspect

Instance Attribute Details

#block -> Proc (readonly)

Returns The block of the command.

Returns:

  • (Proc)

    The block of the command.



18
19
20
# File 'lib/discorb/app_command/command.rb', line 18

def block
  @block
end

#guild_ids -> Array<#to_s> (readonly)

Returns The guild ids that the command is enabled in.

Returns:

  • (Array<#to_s>)

    The guild ids that the command is enabled in.



16
17
18
# File 'lib/discorb/app_command/command.rb', line 16

def guild_ids
  @guild_ids
end

#id_map -> Discorb::Dictionary{Discorb::Snowflake, :global => Discorb::Snowflake} (readonly)

Returns The ID mapping.

Returns:



24
25
26
# File 'lib/discorb/app_command/command.rb', line 24

def id_map
  @id_map
end

#name -> String (readonly)

Returns The name of the command.

Returns:

  • (String)

    The name of the command.



14
15
16
# File 'lib/discorb/app_command/command.rb', line 14

def name
  @name
end

#type -> :chat_input, ... (readonly)

Returns The type of the command.

Returns:

  • (:chat_input, :user, :message)

    The type of the command.



20
21
22
# File 'lib/discorb/app_command/command.rb', line 20

def type
  @type
end

#type_raw -> Integer (readonly)

Returns The raw type of the command.

Returns:

  • (Integer)

    The raw type of the command.



22
23
24
# File 'lib/discorb/app_command/command.rb', line 22

def type_raw
  @type_raw
end