SlashCommandHandler
This is used to interact with the Discord SlashCommand api.
Last updated
Was this helpful?
This is used to interact with the Discord SlashCommand api.
Last updated
Was this helpful?
Parameter
Type
Required
Default
Description
options
SlashCommandOptions
true
none
The options for the SlashCommandHandler
client
The client this handler uses. Type: | undefined
clientLike
This contains the client token & id, used for making API requests. Type: | undefined
clientID
The id of the client | clientlike. Type: string
registerCommands
If enabled, commands will get patched / deleted / created. Type: bool
runCommands
If enabled, command will be run. disable when on the ShardingManager. Type: bool
deleteUnregisteredCommands
If enabled, commands that no longer exist will get deleted. Type: bool
sendPongIfNoResponse
If the ran command hasn't executed any interaction callback, execute a PONG with source. Type: bool
parseInteractionOptions
If enabled, If enabled this will automatically parse the options of an Interaction. Type: bool
debug
If enabled, the debug messages will be displayed. Type: bool
debugPrefix
The prefix of the debug messages. Type: string
sendNoLongerAvailable
If enabled, when a command gets executed that isn't recognized it will return a message. Type: bool
noLongerAvailableMessage
The message which should be displayed if sendNoLongerAvailable is true. Type: string
Start the command registration process, if you are using a Discord.Client instance you don't need to execute this command Returns: void
async respond(tokenID: string, response: InteractionResponse)
Respond to an Interaction. Returns: void
log(msg: any, ...optionalParams: any[])
Logs the provided message if this.debug is true, params are simulair to console.log Returns: void
addCommand(command: )
Create and register a new Command. Returns:
async start(command: )