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

    Interface CommandManagerOptions

    Cấu hình cho CommandManager.

    interface CommandManagerOptions {
        directory: string;
        onError?: (data: { error: Error; file: string }) => void;
        onLoad?: (command: CommandBuilder) => void;
        prefix: string | string[];
    }
    Index

    Properties

    directory: string

    Thư mục chứa message command files.

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

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

    onLoad?: (command: CommandBuilder) => void

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

    Type Declaration

    prefix: string | string[]

    Prefix được sử dụng để gọi command.

    Có thể là:

    • một prefix duy nhất
    • nhiều prefix

    Ví dụ:

    prefix: "!"
    prefix: ["!", "?"]