Table of Contents

Method GetShard

Namespace
DSharpPlus
Assembly
DSharpPlus.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.