Class DiscordShardedClient
- Namespace
- DisCatSharp
- Assembly
- DisCatSharp.dll
A Discord client that shards automatically.
public sealed class DiscordShardedClient
- Inheritance
-
DiscordShardedClient
- Inherited Members
Constructors
- DiscordShardedClient(DiscordConfiguration)
Initializes a new auto-sharding Discord client.
Properties
- BotLibrary
Gets the bot library name.
- CurrentApplication
Gets the current application.
- CurrentUser
Gets the current user.
- GatewayInfo
Gets the gateway info for the client's session.
- Logger
Gets the logger for this client.
- ShardClients
Gets all client shards.
- VoiceRegions
Gets the list of available voice regions. Note that this property will not contain VIP voice regions.
Methods
- 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.
- 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.
- StartAsync()
Initializes and connects all shards.
- StopAsync()
Disconnects and disposes all shards.
- UpdateStatusAsync(DiscordActivity, UserStatus?, DateTimeOffset?)
Updates the status on all shards.
Events
- ApplicationCommandCreated
Fired when a new application command is registered.
- ApplicationCommandDeleted
Fired when an application command is deleted.
- ApplicationCommandPermissionsUpdated
Fired when application command permissions gets updated.
- ApplicationCommandUpdated
Fired when an application command is updated.
- AutomodActionExecuted
Fired when a rule is triggered and an action is executed.
- AutomodRuleCreated
Fired when an auto mod rule gets created.
- AutomodRuleDeleted
Fired when an auto mod rule gets deleted.
- AutomodRuleUpdated
Fired when an auto mod rule gets updated.
- ChannelCreated
Fired when a new channel is created. For this Event you need the Guilds intent specified in Intents
- ChannelDeleted
Fired when a channel is deleted For this Event you need the Guilds intent specified in Intents
- ChannelPinsUpdated
Fired whenever a channel's pinned message list is updated. For this Event you need the Guilds intent specified in Intents
- ChannelUpdated
Fired when a channel is updated. For this Event you need the Guilds intent specified in Intents
- ClientErrored
Fired whenever an error occurs within an event handler.
- ComponentInteractionCreated
Fired when a component is invoked.
- ContextMenuInteractionCreated
Fired when a user uses a context menu.
- DmChannelDeleted
Fired when a dm channel is deleted For this Event you need the DirectMessages intent specified in Intents
- EmbeddedActivityUpdated
Fired when a embedded activity has been updated.
- EntitlementCreated
Fired when an entitlement was created.
- EntitlementDeleted
Fired when an entitlement was deleted.
- EntitlementUpdated
Fired when an entitlement was updated.
- GuildApplicationCommandCountUpdated
Fired when a new application command is registered.
- GuildAuditLogEntryCreated
Fired when a guild audit log entry was created.
- GuildAvailable
Fired when a guild is becoming available.
- GuildBanAdded
Fired when a guild ban gets added For this Event you need the GuildModeration intent specified in Intents
- GuildBanRemoved
Fired when a guild ban gets removed For this Event you need the GuildModeration intent specified in Intents
- GuildCreated
Fired when the user joins a new guild. For this Event you need the Guilds intent specified in Intents
- GuildDeleted
Fired when the user leaves or is removed from a guild. For this Event you need the Guilds intent specified in Intents
- GuildDownloadCompleted
Fired when all guilds finish streaming from Discord.
- GuildEmojisUpdated
Fired when a guilds emojis get updated For this Event you need the GuildEmojisAndStickers intent specified in Intents
- GuildIntegrationCreated
Fired when a guild integration is created. For this Event you need the GuildIntegrations intent specified in Intents
- GuildIntegrationDeleted
Fired when a guild integration is deleted. For this Event you need the GuildIntegrations intent specified in Intents
- GuildIntegrationUpdated
Fired when a guild integration is updated. For this Event you need the GuildIntegrations intent specified in Intents
- GuildIntegrationsUpdated
Fired when a guild integration is updated.
- GuildMemberAdded
Fired when a new user joins a guild. For this Event you need the GuildMembers intent specified in Intents
- GuildMemberRemoved
Fired when a user is removed from a guild (leave/kick/ban). For this Event you need the GuildMembers intent specified in Intents
- GuildMemberTimeoutAdded
Fired when a guild member timeout gets added. For this Event you need the GuildModeration intent specified in Intents
- GuildMemberTimeoutChanged
Fired when a guild member timeout gets changed. For this Event you need the GuildMembers intent specified in Intents
- GuildMemberTimeoutRemoved
Fired when a guild member timeout gets removed. For this Event you need the GuildMembers intent specified in Intents
- GuildMemberUpdated
Fired when a guild member is updated. For this Event you need the GuildMembers intent specified in Intents
- GuildMembersChunked
Fired in response to Gateway Request Guild Members.
- GuildRoleCreated
Fired when a guild role is created. For this Event you need the Guilds intent specified in Intents
- GuildRoleDeleted
Fired when a guild role is updated. For this Event you need the Guilds intent specified in Intents
- GuildRoleUpdated
Fired when a guild role is updated. For this Event you need the Guilds intent specified in Intents
- GuildScheduledEventCreated
Fired when a scheduled event is created. For this Event you need the GuildScheduledEvents intent specified in Intents
- GuildScheduledEventDeleted
Fired when a scheduled event is deleted. For this Event you need the GuildScheduledEvents intent specified in Intents
- GuildScheduledEventUpdated
Fired when a scheduled event is updated. For this Event you need the GuildScheduledEvents intent specified in Intents
- GuildScheduledEventUserAdded
Fired when a user subscribes to a scheduled event. For this Event you need the GuildScheduledEvents intent specified in Intents
- GuildScheduledEventUserRemoved
Fired when a user unsubscribes from a scheduled event. For this Event you need the GuildScheduledEvents intent specified in Intents
- GuildSoundboardSoundCreated
Fired when a guild soundboard sound is created. For this Event you need the GuildExpressions intent specified in Intents
- GuildSoundboardSoundDeleted
Fired when a guild soundboard sound is deleted. For this Event you need the Guilds intent specified in Intents
- GuildSoundboardSoundUpdated
Fired when a guild soundboard sound is updated. For this Event you need the Guilds intent specified in Intents
- GuildSoundboardSoundsUpdated
Fired when guild soundboard sounds is updated. For this Event you need the Guilds intent specified in Intents
- GuildStickersUpdated
Fired when a guilds stickers get updated For this Event you need the GuildEmojisAndStickers intent specified in Intents
- GuildUnavailable
Fired when a guild becomes unavailable.
- GuildUpdated
Fired when a guild is updated. For this Event you need the Guilds intent specified in Intents
- Heartbeated
Fired on received heartbeat ACK.
- InteractionCreated
Fired when an interaction is invoked.
- InviteCreated
Fired when an invite is created. For this Event you need the GuildInvites intent specified in Intents
- InviteDeleted
Fired when an invite is deleted. For this Event you need the GuildInvites intent specified in Intents
- MessageCreated
Fired when a message is created. For this Event you need the GuildMessages intent specified in Intents
- MessageDeleted
Fired when a message is deleted. For this Event you need the GuildMessages intent specified in Intents
- MessagePollVoteAdded
Fired when a message poll vote is added. For this Event you need the GuildMessagePolls and DirectMessagePolls intent (depending on where u want to receive events from) specified in Intents.
- MessagePollVoteRemoved
Fired when a message poll vote is removed. For this Event you need the GuildMessagePolls and DirectMessagePolls intent (depending on where u want to receive events from) specified in Intents.
- MessageReactionAdded
Fired when a reaction gets added to a message. For this Event you need the GuildMessageReactions intent specified in Intents
- MessageReactionRemoved
Fired when a reaction gets removed from a message. For this Event you need the GuildMessageReactions intent specified in Intents
- MessageReactionRemovedEmoji
Fired when all reactions of a specific reaction are removed from a message. For this Event you need the GuildMessageReactions intent specified in Intents
- MessageReactionsCleared
Fired when all reactions get removed from a message. For this Event you need the GuildMessageReactions intent specified in Intents
- MessageUpdated
Fired when a message is updated. For this Event you need the GuildMessages intent specified in Intents
- MessagesBulkDeleted
Fired when multiple messages are deleted at once. For this Event you need the GuildMessages intent specified in Intents
- PayloadReceived
Fired when a gateway payload is received.
- PresenceUpdated
Fired when a presence has been updated. For this Event you need the GuildPresences intent specified in Intents
- Ready
Fired when the client enters ready state.
- Resumed
Fired whenever a session is resumed.
- SocketClosed
Fired whenever WebSocket connection is terminated.
- SocketErrored
Fired whenever a WebSocket error occurs within the client.
- SocketOpened
Fired whenever WebSocket connection is established.
- SoundboardSounds
Fired in response to RequestSoundboardSoundsAsync(IEnumerable<ulong>).
- StageInstanceCreated
Fired when a Stage Instance is created. For this Event you need the Guilds intent specified in Intents
- StageInstanceDeleted
Fired when a Stage Instance is deleted. For this Event you need the Guilds intent specified in Intents
- StageInstanceUpdated
Fired when a Stage Instance is updated. For this Event you need the Guilds intent specified in Intents
- ThreadCreated
Fired when a thread is created. For this Event you need the Guilds intent specified in Intents
- ThreadDeleted
Fired when a thread is deleted. For this Event you need the Guilds intent specified in Intents
- ThreadListSynced
Fired when a thread member is updated. For this Event you need the Guilds intent specified in Intents
- ThreadMemberUpdated
Fired when a thread member is updated. For this Event you need the Guilds intent specified in Intents
- ThreadMembersUpdated
Fired when the thread members are updated. For this Event you need the GuildMembers or Guilds intent specified in Intents
- ThreadUpdated
Fired when a thread is updated. For this Event you need the Guilds intent specified in Intents
- TypingStarted
Fired when a user starts typing in a channel.
- UnknownEvent
Fired when an unknown event gets received.
- UserSettingsUpdated
Fired when the current user updates their settings. For this Event you need the GuildPresences intent specified in Intents
- UserUpdated
Fired when properties about the current user change. For this Event you need the GuildPresences intent specified in Intents
- VoiceChannelEffectSend
Fired when a voice channel effect was send. For this Event you need the GuildVoiceStates intent specified in Intents
- VoiceChannelStatusUpdated
Fired whenever a voice channel's status is updated. For this Event you need the Guilds intent specified in Intents
- VoiceServerUpdated
Fired when a guild's voice server is updated. For this Event you need the GuildVoiceStates intent specified in Intents
- VoiceStateUpdated
Fired when someone joins/leaves/moves voice channels. For this Event you need the GuildVoiceStates intent specified in Intents
- WebhooksUpdated
Fired whenever webhooks update.
- Zombied
Fired on heartbeat attempt cancellation due to too many failed heartbeats.