How to get Client object from a Shard?

I need to process some async data. So I'm not rellying on discord.js events like message create, but something like and webhook that commmunicates with my bot I'm using shards, so when I receive the async data, I need to redirect it to the shard that has the proper guild/member info that I need fetched So, how can I get a Client object of a shard using my ShardManager? Because, with the Client, I can try to perform a search for the data I need
3 Replies
d.js toolkit
d.js toolkit4mo ago
- 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 staff
d.js docs
d.js docs4mo ago
:method: Shard#eval @14.15.3 Evaluates a script or function on the shard, in the context of the Client. :property: ShardingManager#shards @14.15.3 A collection of shards that this manager has spawned :method: (static) ShardClientUtil#shardIdForGuildId @14.15.3 Get the shard id for a given guild id.
Marcus Natrielli
Marcus NatrielliOP4mo ago
@Qjuh thanks!! That was what I was looking for
Want results from more Discord servers?
Add your server