Command
Defined in: packages/core/src/commands.ts:234
A command made by command.
Type Parameters
Section titled “Type Parameters”M extends OptionMap = OptionMap
Properties
Section titled “Properties”description
Section titled “description”
readonlydescription:string
Defined in: packages/core/src/commands.ts:236
guildOnly
Section titled “guildOnly”
readonlyguildOnly:boolean
Defined in: packages/core/src/commands.ts:239
readonlyname:string
Defined in: packages/core/src/commands.ts:235
readonlynsfw:boolean
Defined in: packages/core/src/commands.ts:240
options
Section titled “options”
readonlyoptions:M
Defined in: packages/core/src/commands.ts:237
permissions
Section titled “permissions”
readonlypermissions: readonlyPermissionName[]
Defined in: packages/core/src/commands.ts:238
prefix
Section titled “prefix”
readonlyprefix:false| {aliases: readonlystring[]; }
Defined in: packages/core/src/commands.ts:244
Whether it answers a prefix, and under which other names.
readonlyslash:boolean
Defined in: packages/core/src/commands.ts:242
Whether it is registered as a slash command.
Methods
Section titled “Methods”run(
context):unknown
Defined in: packages/core/src/commands.ts:245
Parameters
Section titled “Parameters”context
Section titled “context”Returns
Section titled “Returns”unknown
toJSON()
Section titled “toJSON()”toJSON():
Record<string,unknown>
Defined in: packages/core/src/commands.ts:247
The slash command as Discord expects it.
Returns
Section titled “Returns”Record<string, unknown>
usage()
Section titled “usage()”usage(
prefix):string
Defined in: packages/core/src/commands.ts:249
The usage line of the prefix form, such as !timeout <user> [minutes] [reason…].
Parameters
Section titled “Parameters”prefix
Section titled “prefix”string
Returns
Section titled “Returns”string