SlashCommand#

The slash command class.

Constructor#

new SlashCommand(client, manager, data)#

The constructor of the slash command class.

Parameters:
NameTypeDescription
clientClient

The client

managerSlashCommandInteractionManager

The slash command interaction manager

dataSlashCommandData

The data of the slash command

Extends#

Members#

betaOnly#

If the base interaction is beta access only

category#

The category of the base interaction

channelOnly#

The types of channel the base interaction is executable in

client :Client#

The client

Type:
  • Client

clientPermissions#

The required permissions for the client to execute the base interaction

cooldown#

The cooldown of the base interaction in seconds

cooldowns :Map.<Snowflake, Boolean>#

The map with all cooldowns

Type:
  • Map.<Snowflake, Boolean>

defaultMemberPermissions#

The permissions required for the member to be able to use / see the base interaction

defer#

If the base interaction should be deferred

deployEnabled#

If deploying is enabled for the slash command

description#

The description of the slash command

descriptionLocalizations#

The localization descriptions of the slash command

devOnly#

If the base interaction can only be executed by developers

dirname#

The dirname of the saved location of the base interaction

dmEnabled#

If the base interaction is enabled in dms by default

enabled#

If the base interaction is enabled

ephemeral#

If the response is ephemeral

experiment#

The experiment data of the base interaction

guildOnly#

If the base interaction is only executable in guilds

hidden#

If the slash command should be hidden in the list

id#

The id of the base interaction

location#

The location of the base interaction

manager :SlashCommandInteractionManager#

The slash command manager

name#

The name of the base interaction

nameLocalizations#

The localization names of the base interaction

nsfw#

If the base interaction is nsfw

options#

The options of the slash command

ownerOnly#

If the base interaction is owner access only

premiumOnly#

If the base interaction is premium access only

type#

The type of the base interaction

usage#

The usage of the slash command with all arguments

userPermissions#

The required permissions for the user to execute the base interaction

Methods#

deploy() → {Promise.<(Boolean|DisGroupDevError)>}#

Deploys the slash command

Returns:
Type: 
Promise.<(Boolean|DisGroupDevError)>

load() → {Promise.<(Boolean|DisGroupDevError)>}#

Loads the slash command

Returns:
Type: 
Promise.<(Boolean|DisGroupDevError)>

reload() → {Promise.<(Boolean|DisGroupDevError)>}#

Reloads the slash command

Returns:
Type: 
Promise.<(Boolean|DisGroupDevError)>

toJSON() → {BaseInteractionData}#

The full data of the base interaction

Returns:
Type: 
BaseInteractionData

unload() → {Promise.<(Boolean|DisGroupDevError)>}#

Unloads the slash command

Returns:
Type: 
Promise.<(Boolean|DisGroupDevError)>