UNPKG

dkto.js

Version:

<a href="https://discord.gg/H9Scw4mztH"><img src="https://img.shields.io/discord/944271427429871658?color=5865F2&logo=discord&logoColor=white" alt="Discord Server"/></a>

20 lines (15 loc) 494 B
class Cooldown { /* Creates a map under a global cooldown map */ constructor( parentKey: string, num: number, prefix: "s" | "m" | "h" | "d" | "w" ); /* Returns whether the subKey is on cooldown under the parentKey's map */ isOnCooldown(subKey: string): boolean; /* Returns a number in seconds */ getRemaining(subKey: string): number; /* Sets the cooldown of the subKey under the parentKey's map */ setCooldown(subKey: string): void; } export { Cooldown };