Duplicate messages in multiple shards
Hello, I have a bot with multiple shards.
I attempted to send a Discord message when the bot receives a WebSocket message.
However, I'm currently facing an issue.
If I use the code mentioned above, sometimes multiple shards will send the same message simultaneously.
For instance, shard 4 and shard 8 both have access to the channel,
resulting in duplicate messages.
Is this behavior normal? How can I ensure that only one shard sends the message?
1 Reply
- 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!