@gcommands/plugin-cooldowns
Version:
Set cooldown for your command
15 lines (14 loc) • 655 B
TypeScript
import { CommandContext, ComponentContext, Inhibitor } from 'gcommands';
import { Snowflake } from 'discord.js';
export interface CooldownInhibitorOptions extends Inhibitor.InhibitorOptions {
whitelist?: Array<Snowflake>;
getWhitelist?(ctx: CommandContext | ComponentContext): Array<Snowflake>;
cooldown: string;
}
export declare class CooldownInhibitor extends Inhibitor.Inhibitor {
whitelist?: Array<Snowflake>;
getWhitelist?(ctx: CommandContext | ComponentContext): Array<Snowflake>;
readonly cooldown: number;
constructor(options: CooldownInhibitorOptions);
run(ctx: CommandContext | ComponentContext): Promise<any>;
}