Skip to main content

Cooldowns

You can cooldown your commands with ease using the cooldown plugin.

Import the Plugins decorator and the Bucket enum.

Example

const { Bucket, Command, Maker, Plugins } = require("erine");

class Test extends Maker {
@Command({ name: "test", description: "Just a test command." })
@Plugins.cooldown(Bucket.Member, 60)
async test(ctx) {
// do something.
}
}

module.exports = { data: Test };

!> You should handle cooldown error with the error event.