Reaction Collector not collecting reactions in DMs
discordjs 14.12.1
24 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!might need the partials?
what do you mean?
discord.js Guide
Imagine a guide... that explores the many possibilities for your discord.js bot.
you need channel partial to get messages so would make sense to have them as well i think.
Is this what you're saying?
get dm intent asw
I guess I don't really need guild intents, eh?
Guilds is one you should ideally always enable
Seen you also have GuildMessages, just keep it
Adding that didn't solve the issue. It's still not recognizing when I react to the message
My bot DMs the user, and I need to capture their reaction so that I can record whether they are interested this week.
I see, the message is defined here:
Here is the full code before the collector:
emoji.name
property to an array of emoji characters. However, the emoji.name
property isn't actually the Unicode character (that you have specified in the array) but rather the emojis literal name (:thumbsup:
in this case) therefor doesn't match, causing the function to return false.
Instead of using emoji.name
you should be able to use emoji.toString()
(I think) or just have the emoji's literal name in the array instead of the Unicode characters.
Hope that makes sense.I still can't figure out why it won't respond
it would be ideal if you updated the version to newest. Perhaps there is a bug in that version?
I have now updated to 14.15.3, it still isn't responding. I have made a few adjustments to the script while trying to fix this issue, so for reference here is the current code:
could you clarify how this function is being called?
you appear to have a
Client
defined at the top of this file, but you're also exporting a function that receives a client
as a param?
is it possible this client where you have the correct intents/partials isn't actually the client that's logged in?The function is intended to be run automatically on a weekly schedule, but for testing purposes I am running it manually with a slash command send-invitations
I just realized that the client definition wasn't doing anything. I have removed it from the beginning of coffeeChatScheduler. My issue persists though.
could you show your actual client definition then?
have you ensured you have the proper intents/partials there?
I define the client in my index.js here:
this
djsbotbuilder
package (which I notice is yours) does not seem to take a client
as an option of runBot
it does define its own Client
internally, so you should take a look at that client definitionAh yes, I have recently changed djsbotbuilder to take client. I have not yet published that change, but I am using a linked version of djsbotbuilder for testing. This is the current runBot function:
I don't believe I have made any other changes to djsbotbuilder since my last publish
I still haven't been able to figure this out