ICommand
The ICommand interface for a command | Type Interface Annotation
type
Whether the command is slash command, legacy command, or both
true
delete
Tells the command handler whether to disable this command from interaction with the guilds
Boolean
false
init
Runs events inside a command
Function
false
autocomplete
Handles autocomplete interaction for a Slash command
Function
false
description
The description of the command
String
true
minArgs
The minimum amount of arguments for the command
Number
false
maxArgs
The maximum amount of arguments for the command
Number
false
correctSyntax
Sends a message specified in correctSyntax
if arguments validation failed. Hover from your text editor for annotations.
String
false
expectedArgs
The expected arguments that should be in place. Hover from your text editor for annotations and the important message.
String
false
expectedArgsTypes
Defines the Slash Command option property for expectedArgs
false
permissions
The command permissions
PermissionResolvable[]
false
testOnly
Whether the command is for test guilds or not
Boolean
false
guildOnly
Whether the command only works only in guilds
Boolean
false
ownerOnly
Whether the command is only allowed for bot owners
Boolean
false
deferReply
Tells the command handler whether to delay command reply when any value is returned from the command
Boolean
false
reply
Tells the command handler to tell the bot to either reply or send channel message. Hover on your editor for details
Boolean
false
cooldowns
The command cooldowns
false
options
The Discord.JS arguments (only works for Slash Commands). Specify this if you are used to handle Discord.JS arguments with Slash Commands.
false
callback
The function to execute when the command is called
true
aliases
Short-form commands
String[]
false
Last updated