Constructor#
new SlashCommand(client, manager, data)#
The constructor of the slash command class.
Name | Type | Description |
---|---|---|
client | Client | The client |
manager | SlashCommandInteractionManager | The slash command interaction manager |
data | SlashCommandData | The data of the slash command |
Extends#
Members#
betaOnly#
If the base interaction is beta access only
- Overrides
category#
The category of the base interaction
- Overrides
channelOnly#
The types of channel the base interaction is executable in
- Overrides
client :Client#
The client
- Client
- Overrides
clientPermissions#
The required permissions for the client to execute the base interaction
- Overrides
cooldown#
The cooldown of the base interaction in seconds
- Overrides
cooldowns :Map.<Snowflake, Boolean>#
The map with all cooldowns
- Map.
<Snowflake, Boolean>
- Overrides
defaultMemberPermissions#
The permissions required for the member to be able to use / see the base interaction
defer#
If the base interaction should be deferred
- Overrides
deployEnabled#
If deploying is enabled for the slash command
- Overrides
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
- Overrides
dirname#
The dirname of the saved location of the base interaction
- Overrides
dmEnabled#
If the base interaction is enabled in dms by default
- Overrides
enabled#
If the base interaction is enabled
- Overrides
ephemeral#
If the response is ephemeral
- Overrides
experiment#
The experiment data of the base interaction
- Overrides
guildOnly#
If the base interaction is only executable in guilds
- Overrides
hidden#
If the slash command should be hidden in the list
id#
The id of the base interaction
- Overrides
location#
The location of the base interaction
- Overrides
manager :SlashCommandInteractionManager#
The slash command manager
name#
The name of the base interaction
- Overrides
nameLocalizations#
The localization names of the base interaction
- Overrides
nsfw#
If the base interaction is nsfw
- Overrides
options#
The options of the slash command
ownerOnly#
If the base interaction is owner access only
- Overrides
premiumOnly#
If the base interaction is premium access only
- Overrides
type#
The type of the base interaction
- Overrides
usage#
The usage of the slash command with all arguments
userPermissions#
The required permissions for the user to execute the base interaction
- Overrides
Methods#
deploy() → {Promise.<(Boolean|DisGroupDevError)>}#
Deploys the slash command
- Type:
- Promise.
<(Boolean| DisGroupDevError)>
load() → {Promise.<(Boolean|DisGroupDevError)>}#
Loads the slash command
- Type:
- Promise.
<(Boolean| DisGroupDevError)>
reload() → {Promise.<(Boolean|DisGroupDevError)>}#
Reloads the slash command
- Type:
- Promise.
<(Boolean| DisGroupDevError)>
toJSON() → {BaseInteractionData}#
The full data of the base interaction
- Overrides
- Type:
- BaseInteractionData
unload() → {Promise.<(Boolean|DisGroupDevError)>}#
Unloads the slash command
- Type:
- Promise.
<(Boolean| DisGroupDevError)>