#I am having a Couple of Problems with
1 messages · Page 1 of 1 (latest)
Firstly, since updating; Whenever anyone posts in the Text Channel part of a Voice Channel, I get this crash:
Also, I get those messages saying "Discord sent a typing packet to a voice channel ########" which didn't occur with the same code before.
For the first Issue. I DO recall getting this problem before, but I can't honestly remember how I fixed it...
Lastly, I am trying to get the bot to respond to the event "messageReactionAdd". It does so in one channel that is Private, but not in another channel that is Private. I've tried giving it every permission available in the 2nd channel, but no idea why it reads Reactions in one channel but not the other Channel on the same Guild.
how are you getting channel in channel.messages.cache.get?
This occurs whenever someone posts a Text Message in a Voice Channel.
So channel in this case would be the Voice Channel.
how are you fetching it in the code?
client.on('message', async (msg) => {
The source code referenced is from MessageCreate.js in the Discord library.
And now that I am saying that, I am wondering if Discord.JS got updated but the libraries in this Project did not. Let me check that.
Ok I figured out problem 1. Lets see if that fixes problems 2 and 3.
👍
Just in case someone else reads this. I still had an old Discord version dependency in package.json, and when I used NPM to updated Discord.JS it only updated to that older version. (This is on my testing platform on Windows) Therefore it was still running an old version of Discord.JS which wasn't written to handle text events in Voice Channels, because they did not exist. Causing a hard crash. (Would be caught by an error handler but I prefer a crash at this point)
To fix I deleted package-lock.json and the node_modules folder, and changed the Discord.JS Dependency version, then reinstalled Discord.JS using NPM.
Now bugfixing depreciated commands...
good to hear you fixed the original problem. gl updating your bot!
Ok.... so... in order to add/check Reactions to a Message, the Message has to be posted AFTER the last time the Bot was launched? If the Message existed before the Bot was run, then it cannot check Reactions that are added? Is that correct? Thats weird....