Method GetShard
- Namespace
- DisCatSharp
- Assembly
- DisCatSharp.dll
GetShard(ulong)
Gets a shard from a guild id.
If automatically sharding, this will use the GetShardId(ulong, int) method. Otherwise if manually sharding, it will instead iterate through each shard's guild caches.
public DiscordClient GetShard(ulong guildId)
Parameters
guildId
ulongThe guild ID for the shard.
Returns
- DiscordClient
The found DiscordClient shard. Otherwise null if the shard was not found for the guild id.
GetShard(DiscordGuild)
Gets a shard from a guild.
If automatically sharding, this will use the GetShardId(ulong, int) method. Otherwise if manually sharding, it will instead iterate through each shard's guild caches.
public DiscordClient GetShard(DiscordGuild guild)
Parameters
guild
DiscordGuildThe guild for the shard.
Returns
- DiscordClient
The found DiscordClient shard. Otherwise null if the shard was not found for the guild.