@gcommands/plugin-cooldowns
Version:
Set cooldown for your command
13 lines (12 loc) • 490 B
TypeScript
import { LimitedCollection, Snowflake } from 'discord.js';
import { GClient } from 'gcommands';
export declare class CooldownManager {
cache: LimitedCollection<Snowflake, number>;
constructor();
init(): void;
hasCooldown(client: GClient, userId: Snowflake): Promise<boolean | string>;
setCooldown(client: GClient, userId: Snowflake, cooldown: number): Promise<void>;
private _getCooldown;
private _setCooldown;
}
export declare const Cooldowns: CooldownManager;