RileCraft / DiscordBot-Template

A bot template with command , event , button , selectmenus , slashcommands handler and error handlers. Made in Discord.JS V14
MIT License
229 stars 59 forks source link

Error Cooldown #7

Closed GillHoang closed 2 years ago

GillHoang commented 2 years ago

` if (!command.cooldown) return false; ^

TypeError: Cannot read properties of undefined (reading 'cooldown') at module.exports (/home/runner/saitama/Root/Classes/CommandOptions/Cooldown.js:2:18) at module.exports (/home/runner/saitama/Root/Classes/CommandOptions/loadCommandOptions.js:5:75) at Object.run (/home/runner/saitama/Root/Events/InteractionCreate.js:5:37) at Client. (/home/runner/saitama/Root/Classes/Handlers/loadEvents.js:16:55) at Client.emit (node:events:402:35) at InteractionCreateAction.handle (/home/runner/saitama/node_modules/discord.js/src/client/actions/InteractionCreate.js:70:12) at Object.module.exports [as INTERACTION_CREATE] (/home/runner/saitama/node_modules/discord.js/src/client/websocket/handlers/INTERACTION_CREATE.js:4:36) at WebSocketManager.handlePacket (/home/runner/saitama/node_modules/discord.js/src/client/websocket/WebSocketManager.js:350:31) at WebSocketShard.onPacket (/home/runner/saitama/node_modules/discord.js/src/client/websocket/WebSocketShard.js:443:22) at WebSocketShard.onMessage (/home/runner/saitama/node_modules/discord.js/src/client/websocket/WebSocketShard.js:300:10)`

RileCraft commented 2 years ago

Try the latest update. It is currently a temporary fix and i will try to find soon the cause of the error. @hocsinhgioitoan