blackcat.js-discord - v1.0.10
    Preparing search index...

    Interface SlashCommandManagerOptions

    Options cấu hình cho SlashCommandManager.

    interface SlashCommandManagerOptions {
        directory: string;
        guildID?: string | string[];
        onError?: (data: { error: Error; file: string }) => void;
        onLoad?: (command: SlashCommandBuilder) => void;
        reset?: { global?: boolean; guild?: boolean };
    }
    Index

    Properties

    directory: string

    Thư mục chứa các file slash command.

    guildID?: string | string[]

    Guild ID để đăng ký guild slash commands.

    Nếu không cung cấp, commands sẽ được đăng ký global.

    onError?: (data: { error: Error; file: string }) => void

    Callback được gọi khi xảy ra lỗi khi load command.

    onLoad?: (command: SlashCommandBuilder) => void

    Callback được gọi khi một slash command được load thành công.

    Type Declaration

    reset?: { global?: boolean; guild?: boolean }

    Cấu hình reset commands trước khi đăng ký.

    Type Declaration

    • Optionalglobal?: boolean

      Xóa toàn bộ Global Commands trước khi đăng ký.

      false
      
    • Optionalguild?: boolean

      Xóa toàn bộ Guild Commands trước khi đăng ký.

      Chỉ hoạt động nếu có guildID.

      false