Shard info
Hi I want to make a command that shows how many servers each shard has and ping etc. But something is not working. Here are some example results: Shard information
Shard ID: undefined
Number of servers: 120
Ping: 113 ms
Running time: 16 seconds
Memory usage: 54.81 MB
Shard ID: undefined
Number of servers: 120
Ping: N/A ms
Running time: 8 seconds
Memory usage: 40.36 MB
I WANT TO EMPHASIZE THAT MY BOT IS ON 120 SERVERS AND BOTH SHARDS RETURN 120 SERVERS
5 Replies
- 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!why are you sharding if you only have 120 servers?
So far I'm just testing
But I already want to know how to do it
It's pointless with that amount of servers, but it's your choice
client.shard.id
is not a thing. Client can handle multiple shards. So there's client.shard.ids
, but I recommend flat map client.ws.shards