Sharding via DJS and Sapphire
Hey y'all, I'm looking at the Discord.JS docs for sharding and wanting to implement that within Sapphire.
From my search in this server I found to use the DJS method of using it as Sapphire doesn't support extra with that.
However, there isn't a ShardManager included in Sapphire, and I still want to use the Sapphire Client options. Is that still possible with Sapphire or do I have to eliminate the SapphireClient completely (which defeats the purpose?)
Cheers.
Solution:Jump to solution
Sapphire doesn't ship its own sharder because it works with Discordjs's, you just instantiate
SapphireClient instead of Client.6 Replies
Is internal sharding enabled by default on Sapphire?
I see I can just add
shards: 'auto' to the SapphireClientOptions.Solution
Sapphire doesn't ship its own sharder because it works with Discordjs's, you just instantiate
SapphireClient instead of Client.How does this work with ShardManager though?
I just throw that on top of the normal bot?
You add that file, and it'll instantiate multiple processes with a SapphireClient each
It's just that, nothing else, a new file running the ShardingManager to spawn the main file that instantiates the SapphireClient (and everything else with it)
Ah ok.
Thanks!