#how can i access client property on sharding?

16 messages · Page 1 of 1 (latest)

jovial echo
#

I have all music player data on client that I can access through `client.manager.get("guildId") but how can I access this with sharding

like I have to send this data to client side (react.js)

lethal pollen
#

• 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.

ocean panther
#

You still have a client when sharding, I don’t get your question

jovial echo
#

like I am using cluster sharding so how it will create multiple client so how can I access cache memory of specific client

ocean panther
#

Just like that (you access cache of all clients in that code). You can specify the shard you want to call it on if you know which one has the data to reduce data sent over your cluster net

#

In your case no shard seems to have it in your poru structure

jovial echo
#

poru just have guild id

indigo deltaBOT
ocean panther
#

You have the shardId with that then. No need to ask every shard if you know what guild the data is from/on

jovial echo
indigo deltaBOT
ocean panther
#

Specify it in the second parameter as shard

jovial echo
#

Ohk