@tanzanite/discord-akairo
    Preparing search index...

    Type Alias CommandOptions

    CommandOptions: AkairoModuleOptions & {
        aliases?: string[];
        args?: ArgumentOptions[] | ArgumentGenerator;
        argumentDefaults?: DefaultArgumentOptions;
        before?: BeforeAction;
        channel?: "guild" | "dm" | null;
        clientPermissions?: PermissionResolvable | MissingPermissionSupplier;
        condition?: ExecutionPredicate;
        cooldown?: number | null;
        description?: string | ArrayOrNot<any>;
        editable?: boolean;
        flags?: string[];
        ignoreCooldown?: ArrayOrNot<Snowflake> | IgnoreCheckPredicateCommand;
        ignorePermissions?: ArrayOrNot<Snowflake> | IgnoreCheckPredicateCommand;
        localization?: CommandLocalization;
        lock?: KeySupplier | "guild" | "channel" | "user";
        onlyNsfw?: boolean;
        optionFlags?: string[];
        ownerOnly?: boolean;
        prefix?: ArrayOrNot<string> | PrefixSupplier;
        quoted?: boolean;
        ratelimit?: number;
        regex?: RegExp | RegexSupplier;
        separator?: string;
        slash?: boolean;
        slashContexts?: readonly InteractionContextType[];
        slashDefaultMemberPermissions?: PermissionResolvable | null;
        slashEphemeral?: boolean;
        slashGuilds?: string[];
        slashIntegrationTypes?: readonly ApplicationIntegrationType[];
        slashOnly?: boolean;
        slashOptions?: SlashOption[];
        superUserOnly?: boolean;
        typing?: boolean;
        userPermissions?: PermissionResolvable | MissingPermissionSupplier;
    }

    Options to use for command execution behavior.

    Type declaration

    • Optionalaliases?: string[]

      Command names.

      []
      
    • Optionalargs?: ArgumentOptions[] | ArgumentGenerator

      Argument options or generator.

      this.args || []
      
    • OptionalargumentDefaults?: DefaultArgumentOptions

      The default argument options.

      {}
      
    • Optionalbefore?: BeforeAction

      Function to run before argument parsing and execution.

      this.before || (() => undefined)
      
    • Optionalchannel?: "guild" | "dm" | null

      Restricts channel to either 'guild' or 'dm'.

      null
      
    • OptionalclientPermissions?: PermissionResolvable | MissingPermissionSupplier

      Permissions required by the client to run this command.

      this.clientPermissions
      
    • Optionalcondition?: ExecutionPredicate

      Whether or not to run on messages that are not directly commands.

      this.condition || (() => false)
      
    • Optionalcooldown?: number | null

      The command cooldown in milliseconds.

      null
      
    • Optionaldescription?: string | ArrayOrNot<any>

      Description of the command.

      ""
      
    • Optionaleditable?: boolean

      Whether or not message edits will run this command.

      true
      
    • Optionalflags?: string[]

      Flags to use when using an ArgumentGenerator

      []
      
    • OptionalignoreCooldown?: ArrayOrNot<Snowflake> | IgnoreCheckPredicateCommand

      ID of user(s) to ignore cooldown or a function to ignore.

    • OptionalignorePermissions?: ArrayOrNot<Snowflake> | IgnoreCheckPredicateCommand

      ID of user(s) to ignore userPermissions checks or a function to ignore.

    • Optionallocalization?: CommandLocalization

      The slash command localizations.

    • Optionallock?: KeySupplier | "guild" | "channel" | "user"

      The key type or key generator for the locker. If lock is a string, it's expected one of 'guild', 'channel', or 'user'

    • OptionalonlyNsfw?: boolean

      Whether or not to only allow the command to be run in NSFW channels.

      false
      
    • OptionaloptionFlags?: string[]

      Option flags to use when using an ArgumentGenerator.

      []
      
    • OptionalownerOnly?: boolean

      Whether or not to allow client owner(s) only.

      false
      
    • Optionalprefix?: ArrayOrNot<string> | PrefixSupplier

      The prefix(es) to overwrite the global one for this command.

      this.prefix
      
    • Optionalquoted?: boolean

      Whether or not to consider quotes.

      true
      
    • Optionalratelimit?: number

      Amount of command uses allowed until cooldown.

      1
      
    • Optionalregex?: RegExp | RegexSupplier

      A regex to match in messages that are not directly commands. The args object will have match and matches properties.

      this.regex
      
    • Optionalseparator?: string

      Custom separator for argument input.

    • Optionalslash?: boolean

      Mark command as slash command and set information.

      false
      
    • OptionalslashContexts?: readonly InteractionContextType[]

      Interaction context(s) where the command can be used

      Only for globally-scoped commands

    • OptionalslashDefaultMemberPermissions?: PermissionResolvable | null

      The default bitfield used to determine whether this command be used in a guild

      typeof this.userPermissions !== "function" ? this.userPermissions : undefined
      
    • OptionalslashEphemeral?: boolean

      Whether slash command responses for this command should be ephemeral or not.

      false
      
    • OptionalslashGuilds?: string[]

      Assign slash commands to Specific guilds. This option will make the commands not register globally, but only to the chosen servers.

      []
      
    • OptionalslashIntegrationTypes?: readonly ApplicationIntegrationType[]

      Installation context(s) where the command is available

      Only for globally-scoped commands

    • OptionalslashOnly?: boolean

      Only allow this command to be used as a slash command. Also makes slash true

      false
      
    • OptionalslashOptions?: SlashOption[]

      Options for using the slash command.

    • OptionalsuperUserOnly?: boolean

      Whether or not to allow client superUsers(s) only.

      false
      
    • Optionaltyping?: boolean

      Whether or not to type in channel during execution.

      false
      
    • OptionaluserPermissions?: PermissionResolvable | MissingPermissionSupplier

      Permissions required by the user to run this command.

      this.userPermissions