Table of Contents

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 ulong

The 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 DiscordGuild

The guild for the shard.

Returns

DiscordClient

The found DiscordClient shard. Otherwise null if the shard was not found for the guild.