Sparky
    Preparing search index...

    Interface for a Discord Slash Command.

    interface ICommand {
        blockedInDMs?: boolean;
        data:
            | SlashCommandBuilder
            | SlashCommandOptionsOnlyBuilder
            | SlashCommandSubcommandsOnlyBuilder;
        execute: (
            client: Client,
            inter: ChatInputCommandInteraction,
            ...args: any[],
        ) => Promise<void>;
        voiceChannel?: boolean;
    }
    Index

    Properties

    blockedInDMs?: boolean

    Whether the command will be blocked in DMs. By default, commands are allowed in DMs.

    data:
        | SlashCommandBuilder
        | SlashCommandOptionsOnlyBuilder
        | SlashCommandSubcommandsOnlyBuilder

    Discord Slash Command

    execute: (
        client: Client,
        inter: ChatInputCommandInteraction,
        ...args: any[],
    ) => Promise<void>

    Command execution function.

    Type Declaration

      • (
            client: Client,
            inter: ChatInputCommandInteraction,
            ...args: any[],
        ): Promise<void>
      • Parameters

        • client: Client

          The Discord client.

        • inter: ChatInputCommandInteraction

          The interaction that triggered the command.

        • ...args: any[]

          Additional arguments

        Returns Promise<void>

        A promise that resolves when the command is done executing.

    voiceChannel?: boolean

    Whether the command requires the user to be in a voice channel.