UNPKG

@gcommands/plugin-cooldowns

Version:
15 lines (14 loc) 655 B
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>; }