The default help message. This slash command is part of the misc group.

The help message will look like this: Preview

Hierarchy

Constructors

Properties

aliases: string[]

Aliases for this command.

Memberof

Command

Default Value

[]

The client that this command will be used by.

Memberof

Command

dataBuilder: Partial<SlashCommandBuilder>

The data builder for this slash command. You do not need to set its name or description, the constructor will automatically set these based on the command info.

Memberof

SlashCommand

description: string

The description of this command.

Memberof

Command

embedColor: ColorResolvable

The color of the embed for the help message.

Memberof

HelpRegularCommand

embedThumbnail: string

The thumbnail of the embed for the help message.

Memberof

HelpRegularCommand

emoji: string

The emoji of this command. This is used by the default HelpSlashCommand.

Memberof

Command

Default Value

🤖

group: null | CommandGroup

The group that this command is registered to.

Remarks

This gets initialized on command registration.

Memberof

Command

groupID: string

The ID of the group that this command is registered to.

Memberof

Command

guildOnly: boolean

Whether this command may only be used in a guild.

Memberof

Command

Default Value

false

name: string

The name of this command.

Memberof

Command

nsfw: boolean

Whether this command may only be used in a NSFW channel.

Memberof

Command

Default Value

false

ownerOnly: boolean

Whether this command may only be used by the bot's owner.

Memberof

Command

Default Value

false

ownerOverride: boolean

Whether the bot's owner can execute this command even if they don't have the required permissions.

Memberof

Command

Default Value

true

userPermissions: null | PermissionResolvable

The permissions resolvable that defines the permissions that a user requires to execute this command.

Memberof

Command

Default Value

null

Methods

  • Get all the data builders associated to this command. This includes a copy of the original dataBuilder for each command alias.

    Returns Partial<SlashCommandBuilder>[]

    An array of this command's data builders.

  • Check whether the interaction author can execute this command.

    Parameters

    • interaction: ChatInputCommandInteraction<CacheType>

      The interaction that triggered this command.

    Returns string | boolean

    true if the user has enough permissions, or a string with the reason why they cannot execute this command.

  • Handle command error.

    Parameters

    • error: unknown

      The error that was thrown inside the command's run method.

    • interaction: ChatInputCommandInteraction<CacheType>

      The interaction that triggered this command.

    Returns Promise<void>

    Emits

    client#commandError

  • Prepare the fields that will be added to the embed based on all the commands registered on the client. The title of the field will be the group's name and the text will be the list of commands.

    Returns EmbedField[]

    An array of objects that contain the field's title and text.

Generated using TypeDoc