The base component class that other components extend from.

Hierarchy (view full)

Constructors

Properties

authorOnly: boolean

Whether this component can only be used by the author of the interaction.

client: BetterClient

The client that instantiated this component.

cooldown: number

The cooldown of this component. This is in milliseconds.

description: string

The description of the command

dmPermission?: boolean

Whether this component can be used in DMs.

key: string

The key of this component. This is used to identify the component, and is usually used as the custom ID or the command name.

options: ApplicationCommandOptionData[] = []

The options of the command

Default

[]
permissions?: PermissionsBitField

The permissions required from the user to run this component.

type: ApplicationCommandType = ApplicationCommandType.ChatInput

The type of the command

Default

ApplicationCommandType.ChatInput

Methods