zzz
DIAdiscord.js - Imagine an app
•Created by zzz on 8/23/2023 in #djs-questions
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?
2 replies