Strange behavior with selectively sending multiple embeds
I have a welcome message embed. The issue is that the embed will sometimes send 3 times in the welcome channel, but consistently only send once in the log channel, even though they're a part of the same event file. I have no idea how this could happen.
Event file:
Handler:
11 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 OPOnly 1 listener
:issue_open: #10301 in discordjs/discord.js by wisienak opened <t:1716698508:R>
Bot send embed messages twice or even triple times after being not used for a while
Please read through this issue for the solution, you may need to provide nonce
interesting thankyou
Would just this be fine?
When I try to implement
enforceNonce: true
I get a typescript error: TS2353: Object literal may only specify known properties, and enforceNonce does not exist in type MessagePayload | MessageCreateOptions
using 14.14.1 it appears enforceNonce doesnt exist https://discord.js.org/docs/packages/discord.js/14.14.1/MessageCreateOptions:Interface
discord.js
discord.js
discord.js is a powerful Node.js module that allows you to interact with the Discord API very easily. It takes a much more object-oriented approach than most other JS Discord libraries, making your bot's code significantly tidier and easier to comprehend.
Update to latest which is v14.15.3
would this not work on the older version?
it seems stupid to have to supply a boolean enabling something instead of just checking if it was supplied
Probably, enforceNonce tells discord to check for nonce, idk if they do by default, you can try it out and see if works
¯\_(ツ)_/¯
ill try keeping it on 14.14.1 for now
thanks for the help