Skip to content

Greensky-gs/cooldowns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

cooldowns

This is a cooldown manager.

Usage

First, create the manager

const manager = new require('cooldownsManager.js')();
client.CooldownsManager = manager;

Set a cooldown

client.CooldownsManager.set({
  commandName: 'your command name',
  time: 5, // This number is in seconds
  userID: "User id here"
});

And cooldown is automatically done !

Check for a cooldown

client.CooldownsManger.check({
  commandName: "Command name here",
  userID: "user id here"
});

returns true if user has a cooldown returns false if user has not

remaining time

client.CooldownsManager.remainingTime({
  commandName: 'command name',
  userID: "user id"
});

returns false if user has no cooldown returns the number of seconds remains on the cooldown.

Finish !

Now you can use my amazing module !

Releases

No releases published

Packages

No packages published