Function serenity::utils::shard_id [−][src]
Expand description
Calculates the Id of the shard responsible for a guild, given its Id and total number of shards used.
Examples
Retrieve the Id of the shard for a guild with Id 81384788765712384
, using
17 shards:
use serenity::utils;
assert_eq!(utils::shard_id(81384788765712384 as u64, 17), 7);