Interface SlashCommandOptions

The options for the SlashCommand

interface SlashCommandOptions {
    autoDeferral?: boolean | CommandAutoDeferralOptions;
    cooldownSeconds?: number;
    data: ChatInputApplicationCommandData | SlashCommandBuilder;
    metadata?: Record<string, unknown>;
    middlewares?: SlashCommandMiddleware[];
    privateGuildOnly?: boolean;
}

Properties

autoDeferral?: boolean | CommandAutoDeferralOptions

The auto deferral options

Default

false

cooldownSeconds?: number

The cooldown in seconds

Default

null

data: ChatInputApplicationCommandData | SlashCommandBuilder

The data (builder or raw)

metadata?: Record<string, unknown>

The metadata

Default

{}

middlewares?: SlashCommandMiddleware[]

The middlewares

Default

[]

privateGuildOnly?: boolean

Whether or not the command is only usable in the private guilds (ClientOptions.privateGuildIds)

Default

false

Generated using TypeDoc