HarutoHiroki / Discord.js-Bot

An Open Source version of Cryptonix X and a basic frame for any discord.js bot
MIT License
91 stars 60 forks source link

Error on starting #4

Closed SrPeterr closed 4 years ago

SrPeterr commented 4 years ago

Hello!

Im getting this error while starting the bot:

(node:24913) UnhandledPromiseRejectionWarning: TypeError: client.guilds.forEach is not a function at module.exports.client (/home/SrDiscord/events/ready.js:9:19) at Client.client.on (/home/SrDiscord/util/eventLoader.js:3:45) at Client.emit (events.js:203:15) at WebSocketManager.triggerClientReady (/home/SrDiscord/node_modules/discord .js/src/client/websocket/WebSocketManager.js:433:17) at WebSocketManager.checkShardsReady (/home/SrDiscord/node_modules/discord.j s/src/client/websocket/WebSocketManager.js:417:10) at WebSocketShard.shard.on.unavailableGuilds (/home/SrDiscord/node_modules/d iscord.js/src/client/websocket/WebSocketManager.js:199:14) at WebSocketShard.emit (events.js:198:13) at WebSocketShard.checkReady (/home/SrDiscord/node_modules/discord.js/src/cl ient/websocket/WebSocketShard.js:467:12) at WebSocketShard.onPacket (/home/SrDiscord/node_modules/discord.js/src/clie nt/websocket/WebSocketShard.js:439:16) at WebSocketShard.onMessage (/home/SrDiscord/node_modules/discord.js/src/cli ent/websocket/WebSocketShard.js:293:10) (node:24913) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejectio n id: 1) (node:24913) [DEP0018] DeprecationWarning: Unhandled promise rejections are depr ecated. In the future, promise rejections that are not handled will terminate th e Node.js process with a non-zero exit code. (node:24913) UnhandledPromiseRejectionWarning: TypeError: message.guild.roles.find is not a function at Client.client.elevation.message [as elevation] (/home/SrDiscord/index.js:84:37) at Client.module.exports (/home/SrDiscord/events/message.js:23:24) at Client.emit (events.js:198:13) at MessageCreateAction.handle (/home/SrDiscord/node_modules/discord.js/src/client/actions/MessageCreate.js:31:14) at Object.module.exports [as MESSAGE_CREATE] (/home/SrDiscord/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE. js:4:32) at WebSocketManager.handlePacket (/home/SrDiscord/node_modules/discord.js/src/client/websocket/WebSocketManager.js:386:31) at WebSocketShard.onPacket (/home/SrDiscord/node_modules/discord.js/src/client/websocket/WebSocketShard.js:436:22) at WebSocketShard.onMessage (/home/SrDiscord/node_modules/discord.js/src/client/websocket/WebSocketShard.js:293:10) at WebSocket.onMessage (/home/SrDiscord/node_modules/ws/lib/event-target.js:120:16) at WebSocket.emit (events.js:198:13) (node:24913) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)

And the commands do not work, I changed the prefix to ! and none of them work :(

Thanks for your time :)

SrPeterr commented 4 years ago

Solved, I need to downgrade to discord.js 11.6.1