How to run recommended ("auto") shard count all in one thread?
As far as I can tell, the shard manager is always either multi-process or multi-threaded. But I can't find any other way to run multiple shards, so I'm not sure how to do that in a single thread.
7 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!
- ✅
Marked as resolved by OPTo explain why I want to do this, I have a small shard count that doesn't require multiple threads. And I would like to avoid the overhead and restrictions that come with multiple threads.
Just use internal sharding without the sharding manager
How do I do that? I wasn't able to spot a client option
How small are we talking? How many guilds are you managing
:propertysignature: ClientOptions#shards
@14.16.3
The shard's id to run, or an array of shard ids. If not specified, the client will spawn shardCount shards. If set to auto, it will fetch the recommended amount of shards from Discord and spawn that amountah I guess I'm blind, thanks