Kyanq
DIAdiscord.js - Imagine an app
•Created by Kyanq on 6/29/2023 in #djs-questions
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
[email protected]
node.js: v19.3.02 replies