Issues with reading direct messages
Hi, I'm actually developping my bot with discordJS. I'm trying to make an easy function for testing something :
- the user sends a command ( test )
- the bot asks the user ( in for example bots channels ) to send 1 or 2 in DMS.
- Depending on the answer ( 1,2) it will send a message in the channel (bots)
- if it's another thing, it will DM directely the user ( asking to change its choice )
The problem is that the bot can reads the message : "Message Sent by arimak1924 in 1 ( Where 1 is the msg.channel.type ). But the bot doesn't use my DM as it should.
I'll send some parts of my code that could be usefull if anyone knows how to do.
7 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!
- ✅
Marked as resolved by OPdiscord JS 14.14.1 - Node 21.3.0
My test function :
A part of my bot.js ( Intents, DM verification as I tried ) :
Technically when I send a DM to the bot, it can read it but it stops here. I already tried with message.channel.type === 1 and DM but it's still stuck
Those partials are incorrect
same for channel type
Its a number, and use the enum
Alright thanks I'll try to fix it works I thank you