const { Listener } = require('discord-akairo'); class CooldownEvent extends Listener { constructor() { super('cooldown', { event: 'cooldown', emitter: 'commandHandler', category: 'commandHandler', }); } exec(message, command, remaining) { let timeLeft = (remaining - Date.now()) / 1000; message.util.reply( `${this.emotes.error} | Please wait ${timeLeft.toFixed( 1, )} more second(s) before reusing \`${command}\` command.`, ); } } module.exports = CooldownEvent;