Do shards stay consistent?

Like if one server is on a certain shard and I'm using the automatic settings for totalShards, will that server always be on that same shard even after the bot restarts 🤔
4 Replies
Unknown User
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
dzlandis
dzlandis•2y ago
Asking the question as I am working on a system that checks for a specific guild/channel on bot restart, and I'm running into problems due to traditional sharding and some guilds/channels being accessible on one shard but not the other. So I thought I could just store the shard the bot is on before restart for a simple solution. Perhaps this is a bad idea though, please let me know
d.js docs
d.js docs•2y ago
method (static) ShardClientUtil.shardIdForGuildId() Get the shard id for a given guild id.
dzlandis
dzlandis•2y ago
Thank you :)