!help crashes the bot
first of all thx for the bot it works pretty good. but everytime I type !help the bot crashed and spits out this:
C:\Users\Jack\Documents\Discord\DiscordBot-master>node discord_bot.js
Ready to begin! Serving in 15 channels
Loaded 37 chat commands type !help in Discord for a commands list.
treating !help from <@64438422250031872> as command
C:\Users\Jack\Documents\Discord\DiscordBot-master\node_modules\discord.js\lib\Cl
ient\Resolver\Resolver.js:232
var chatFound = this.internal.private_channels.find(func
tion (pmchat) {
^
TypeError: undefined is not a function
at Resolver.resolveChannel (C:\Users\Jack\Documents\Discord\DiscordBot-maste
r\node_modules\discord.js\lib\Client\Resolver\Resolver.js:232:51)
at InternalClient.sendMessage (C:\Users\Jack\Documents\Discord\DiscordBot-ma
ster\node_modules\discord.js\lib\Client\InternalClient.js:494:24)
at Client.sendMessage (C:\Users\Jack\Documents\Discord\DiscordBot-master\nod
e_modules\discord.js\lib\Client\Client.js:95:24)
at Client.<anonymous> (C:\Users\Jack\Documents\Discord\DiscordBot-master\dis
cord_bot.js:618:8)
at Client.emit (events.js:107:17)
at WebSocket.websocket.onmessage (C:\Users\Jack\Documents\Discord\DiscordBot
-master\node_modules\discord.js\lib\Client\InternalClient.js:1261:16)
at WebSocket.onMessage (C:\Users\Jack\Documents\Discord\DiscordBot-master\no
de_modules\discord.js\node_modules\ws\lib\WebSocket.js:418:14)
at WebSocket.emit (events.js:110:17)
at Receiver.ontext (C:\Users\Jack\Documents\Discord\DiscordBot-master\node_m
odules\discord.js\node_modules\ws\lib\WebSocket.js:816:10)
at C:\Users\Jack\Documents\Discord\DiscordBot-master\node_modules\discord.js
\node_modules\ws\lib\Receiver.js:477:18
Mine does this as well.
treating !help from @131225303497310210 as command
/root/DiscordBot/node_modules/discord.js/lib/Client/Resolver/Resolver.js:232
var chatFound = this.internal.private_channels.find(function (pmchat) {
^
TypeError: undefined is not a function
at Resolver.resolveChannel (/root/DiscordBot/node_modules/discord.js/lib/Client/Resolver/Resolver.js:232:51)
at InternalClient.sendMessage (/root/DiscordBot/node_modules/discord.js/lib/Client/InternalClient.js:494:24)
at Client.sendMessage (/root/DiscordBot/node_modules/discord.js/lib/Client/Client.js:95:24)
at Client.
I haven't been able to reproduce this. It's failing inside of discord.js. What version of node are you guys running, and what version of discord.js is being pulled in?
How do I check this?
I fixed that by downloading and replacing node_modules/discord.js/lib/Client/Resolver/Resolver.js from here https://raw.githubusercontent.com/hydrabolt/discord.js/master/src/Client/Resolver/Resolver.js