Skip to content

Commands: Cooldowns #3

Description

@valkyrienyanko

I've been searching all over the web for a npm package called cooldown. I found a few but none of them were any good. I need a cooldown class that can create cooldowns with a ms constructor parameter and methods that return the time left in the cooldown.

The module should go under the directory ./classes/cooldown.js

Here's an idea of what it should look like.

If you really want you can go as far as keeping track of multiple entries as if you don't then I'll be creating a Discord.Collection called client.cooldowns = new Discord.Collection()

const Cooldown = require('../../classes/cooldown.js')

const soFast = new Cooldown(1000)

setTimeout(() => {
  console.log(soFast.timeLeft()) //500
}, 500)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions