https://github.com/greensky-gs/cooldowns
Cooldown manager
https://github.com/greensky-gs/cooldowns
cooldown manager
Last synced: about 1 year ago
JSON representation
Cooldown manager
- Host: GitHub
- URL: https://github.com/greensky-gs/cooldowns
- Owner: Greensky-gs
- Created: 2022-05-14T14:25:00.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-05-14T14:36:32.000Z (about 4 years ago)
- Last Synced: 2025-01-24T04:51:40.507Z (over 1 year ago)
- Topics: cooldown, manager
- Language: JavaScript
- Homepage:
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# cooldowns
This is a cooldown manager.
## Usage
First, create the manager
```js
const manager = new require('cooldownsManager.js')();
client.CooldownsManager = manager;
```
## Set a cooldown
```js
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
```js
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
```js
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 !