Represents on object with options to configure command cooldown/throttling

Implements

Constructors

Properties

duration: number

The duration (in ms) usages should be tracked for

enabled: boolean

Whether the cooldown is enabled and command throttling applies

persistent: boolean = false

Whether the cooldown should persist across restarts

NOTE: This is ONLY a convenience option for the developer, we do not implement any persistence for you, you must do so yourself by using persistent command cooldown middleware. We have an example of this on the main template/example repository

The type of command throttling applied to this command

usages: number

The amount of times the command can be used within the specified duration

default: {
    duration: number;
    enabled: boolean;
    persistent: boolean;
    type: CommandCooldownType;
    usages: number;
} = ...

Type declaration