duplicate client for shard
When connecting this file after authorization of the client with the line:
require('commands.js').init(client);
there is a problem with sharding. Duplicate client instances are created for the same shard. This way you get a lot of clients for one shard and the bot replies to one message many times. commands.js file code:
Without using sharding everything works correctly
discord.js@14.11.0
node.js: v19.3.01 Reply
• What's your exact discord.js
npm list discord.js
and node node -v
version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.