Table of Contents

Class ShardedGatewayClient

Namespace
NetCord.Gateway
Assembly
NetCord.dll
public sealed class ShardedGatewayClient : IReadOnlyList<GatewayClient>, IReadOnlyCollection<GatewayClient>, IEnumerable<GatewayClient>, IEnumerable, IEntity, IDisposable
Inheritance
ShardedGatewayClient
Implements
Inherited Members

Constructors

ShardedGatewayClient(IEntityToken, ShardedGatewayClientConfiguration?)

public ShardedGatewayClient(IEntityToken token, ShardedGatewayClientConfiguration? configuration = null)

Parameters

token IEntityToken
configuration ShardedGatewayClientConfiguration

Properties

Count

The count of shards of the ShardedGatewayClient.

public int Count { get; }

Property Value

int

CreatedAt

The time this object was created.

public DateTimeOffset CreatedAt { get; }

Property Value

DateTimeOffset

Id

The unique identifier for this object.

public ulong Id { get; }

Property Value

ulong

this[int]

public GatewayClient this[int shardId] { get; }

Parameters

shardId int

Property Value

GatewayClient

this[ulong]

public GatewayClient this[ulong guildId] { get; }

Parameters

guildId ulong

Property Value

GatewayClient

Rest

public RestClient Rest { get; }

Property Value

RestClient

Token

public IEntityToken Token { get; }

Property Value

IEntityToken

Methods

CloseAsync(WebSocketCloseStatus)

public Task CloseAsync(WebSocketCloseStatus status = WebSocketCloseStatus.NormalClosure)

Parameters

status WebSocketCloseStatus

Returns

Task

Dispose()

public void Dispose()

GetEnumerator()

public IEnumerator<GatewayClient> GetEnumerator()

Returns

IEnumerator<GatewayClient>

StartAsync(Func<Shard, PresenceProperties?>?)

public Task StartAsync(Func<Shard, PresenceProperties?>? presenceFactory = null)

Parameters

presenceFactory Func<Shard, PresenceProperties>

Returns

Task

Events

ApplicationCommandPermissionsUpdate

Sent when an application command's permissions are updated. The inner payload is an ApplicationCommandPermission object.

public event Func<GatewayClient, ApplicationCommandPermission, ValueTask>? ApplicationCommandPermissionsUpdate

Event Type

Func<GatewayClient, ApplicationCommandPermission, ValueTask>

Remarks

Required Intents: None
Optional Intents: None

AutoModerationActionExecution

Sent when a rule is triggered and an action is executed (e.g. when a message is blocked).

public event Func<GatewayClient, AutoModerationActionExecutionEventArgs, ValueTask>? AutoModerationActionExecution

Event Type

Func<GatewayClient, AutoModerationActionExecutionEventArgs, ValueTask>

Remarks


Required Intents: AutoModerationExecution
Optional Intents:

AutoModerationRuleCreate

Sent when a rule is created. The inner payload is an AutoModerationRule object.

public event Func<GatewayClient, AutoModerationRule, ValueTask>? AutoModerationRuleCreate

Event Type

Func<GatewayClient, AutoModerationRule, ValueTask>

Remarks


Required Intents: AutoModerationConfiguration
Optional Intents: None

AutoModerationRuleDelete

Sent when a rule is deleted. The inner payload is an AutoModerationRule object.

public event Func<GatewayClient, AutoModerationRule, ValueTask>? AutoModerationRuleDelete

Event Type

Func<GatewayClient, AutoModerationRule, ValueTask>

Remarks


Required Intents: AutoModerationConfiguration
Optional Intents: None

AutoModerationRuleUpdate

Sent when a rule is updated. The inner payload is an AutoModerationRule object.

public event Func<GatewayClient, AutoModerationRule, ValueTask>? AutoModerationRuleUpdate

Event Type

Func<GatewayClient, AutoModerationRule, ValueTask>

Remarks


Required Intents: AutoModerationConfiguration
Optional Intents: None

ChannelPinsUpdate

Sent when a message is pinned or unpinned in a text channel. This is not sent when a pinned message is deleted.

public event Func<GatewayClient, ChannelPinsUpdateEventArgs, ValueTask>? ChannelPinsUpdate

Event Type

Func<GatewayClient, ChannelPinsUpdateEventArgs, ValueTask>

Remarks


Required Intents: Guilds, DirectMessages
Optional Intents: None

Close

public event Func<GatewayClient, ValueTask>? Close

Event Type

Func<GatewayClient, ValueTask>

Connect

public event Func<GatewayClient, ValueTask>? Connect

Event Type

Func<GatewayClient, ValueTask>

Connecting

public event Func<GatewayClient, ValueTask>? Connecting

Event Type

Func<GatewayClient, ValueTask>

CurrentUserUpdate

Sent when properties about the current bot's user change. Inner payload is a CurrentUser object.

public event Func<GatewayClient, CurrentUser, ValueTask>? CurrentUserUpdate

Event Type

Func<GatewayClient, CurrentUser, ValueTask>

Remarks


Required Intents: None
Optional Intents: None

Disconnect

public event Func<GatewayClient, bool, ValueTask>? Disconnect

Event Type

Func<GatewayClient, bool, ValueTask>

EntitlementCreate

Sent when an entitlement is created. The inner payload is an Entitlement object.

public event Func<GatewayClient, Entitlement, ValueTask>? EntitlementCreate

Event Type

Func<GatewayClient, Entitlement, ValueTask>

Remarks


Required Intents: None
Optional Intents: None

EntitlementDelete

Sent when an entitlement is deleted. Entitlements are not deleted when they expire. The inner payload is an Entitlement object.

public event Func<GatewayClient, Entitlement, ValueTask>? EntitlementDelete

Event Type

Func<GatewayClient, Entitlement, ValueTask>

Remarks


Required Intents: None
Optional Intents: None

EntitlementUpdate

Sent when an entitlement is updated. When an entitlement for a subscription is renewed, the EndsAt field may have an updated value with the new expiration date. The inner payload is an Entitlement object.

public event Func<GatewayClient, Entitlement, ValueTask>? EntitlementUpdate

Event Type

Func<GatewayClient, Entitlement, ValueTask>

Remarks


Required Intents: None
Optional Intents: None

GuildAuditLogEntryCreate

Sent when a guild audit log entry is created. The inner payload is an AuditLogEntry object. This event is only sent to bots with the ViewAuditLog permission.

public event Func<GatewayClient, AuditLogEntry, ValueTask>? GuildAuditLogEntryCreate

Event Type

Func<GatewayClient, AuditLogEntry, ValueTask>

Remarks


Required Intents: GuildModeration
Optional Intents: None

GuildBanAdd

Sent when a user is banned from a guild.

public event Func<GatewayClient, GuildBanEventArgs, ValueTask>? GuildBanAdd

Event Type

Func<GatewayClient, GuildBanEventArgs, ValueTask>

Remarks


Required Intents: GuildModeration
Optional Intents: None

GuildBanRemove

Sent when a user is unbanned from a guild.

public event Func<GatewayClient, GuildBanEventArgs, ValueTask>? GuildBanRemove

Event Type

Func<GatewayClient, GuildBanEventArgs, ValueTask>

Remarks


Required Intents: GuildModeration
Optional Intents: None

GuildChannelCreate

Sent when a new guild channel is created, relevant to the bot. The inner payload is an IGuildChannel object.

public event Func<GatewayClient, IGuildChannel, ValueTask>? GuildChannelCreate

Event Type

Func<GatewayClient, IGuildChannel, ValueTask>

Remarks


Required Intents: Guilds
Optional Intents: None

GuildChannelDelete

Sent when a channel relevant to the bot is deleted. The inner payload is an IGuildChannel object.

public event Func<GatewayClient, IGuildChannel, ValueTask>? GuildChannelDelete

Event Type

Func<GatewayClient, IGuildChannel, ValueTask>

Remarks


Required Intents: Guilds
Optional Intents: None

GuildChannelUpdate

Sent when a channel is updated. This is not sent with new messages, those are tracked by MessageCreate and GuildThreadCreate. This event may reference roles or guild members that no longer exist in the guild. The inner payload is an IGuildChannel object.

public event Func<GatewayClient, IGuildChannel, ValueTask>? GuildChannelUpdate

Event Type

Func<GatewayClient, IGuildChannel, ValueTask>

Remarks


Required Intents: Guilds
Optional Intents: None

GuildCreate

This event can be sent in three different scenarios (During an outage, the Guild object in scenarios 1 and 3 may be marked as unavailable):

  • To lazily load and backfill information for all unavailable guilds sent in the Ready event. Guilds unavailable due to an outage will send a GuildDelete event.
  • When a guild becomes available again to the client.
  • When the current user joins a new guild.
public event Func<GatewayClient, GuildCreateEventArgs, ValueTask>? GuildCreate

Event Type

Func<GatewayClient, GuildCreateEventArgs, ValueTask>

Remarks

The inner payload can be a Guild object with extra fields, or an unavailable Guild object. If the guild has over 75k users, users and presences returned in this event will only contain your bot and users in voice channels.

Required Intents: Guilds
Optional Intents:

  • GuildPresences For receiving users and presences other than the bot's user and users in voice channels (Same as the 75k limit).

GuildDelete

Sent when a guild becomes or was already unavailable due to an outage, or when the bot leaves / is removed from a guild.

public event Func<GatewayClient, GuildDeleteEventArgs, ValueTask>? GuildDelete

Event Type

Func<GatewayClient, GuildDeleteEventArgs, ValueTask>

Remarks

The inner payload is an unavailable guild object. If the IsUserDeleted field is not true, the bot was removed from the guild.

Required Intents: Guilds
Optional Intents: None

GuildEmojisUpdate

Sent when a guild's emojis have been updated.

public event Func<GatewayClient, GuildEmojisUpdateEventArgs, ValueTask>? GuildEmojisUpdate

Event Type

Func<GatewayClient, GuildEmojisUpdateEventArgs, ValueTask>

Remarks


Required Intents: GuildEmojisAndStickers
Optional Intents: None

GuildIntegrationCreate

Sent when an integration is created. The inner payload is an integration object with a set GuildId.

public event Func<GatewayClient, GuildIntegrationEventArgs, ValueTask>? GuildIntegrationCreate

Event Type

Func<GatewayClient, GuildIntegrationEventArgs, ValueTask>

Remarks


Required Intents: GuildIntegrations
Optional Intents: None

GuildIntegrationDelete

Sent when an integration is deleted.

public event Func<GatewayClient, GuildIntegrationDeleteEventArgs, ValueTask>? GuildIntegrationDelete

Event Type

Func<GatewayClient, GuildIntegrationDeleteEventArgs, ValueTask>

Remarks


Required Intents: GuildIntegrations
Optional Intents: None

GuildIntegrationUpdate

Sent when an integration is updated. The inner payload is an integration object with a set GuildId.

public event Func<GatewayClient, GuildIntegrationEventArgs, ValueTask>? GuildIntegrationUpdate

Event Type

Func<GatewayClient, GuildIntegrationEventArgs, ValueTask>

Remarks


Required Intents: GuildIntegrations
Optional Intents: None

GuildIntegrationsUpdate

Sent when guild integrations are updated.

public event Func<GatewayClient, GuildIntegrationsUpdateEventArgs, ValueTask>? GuildIntegrationsUpdate

Event Type

Func<GatewayClient, GuildIntegrationsUpdateEventArgs, ValueTask>

Remarks


Required Intents: GuildIntegrations
Optional Intents: None

GuildJoinRequestDelete

Not documented by Discord.

public event Func<GatewayClient, GuildJoinRequestDeleteEventArgs, ValueTask>? GuildJoinRequestDelete

Event Type

Func<GatewayClient, GuildJoinRequestDeleteEventArgs, ValueTask>

GuildJoinRequestUpdate

Not documented by Discord.

public event Func<GatewayClient, GuildJoinRequestUpdateEventArgs, ValueTask>? GuildJoinRequestUpdate

Event Type

Func<GatewayClient, GuildJoinRequestUpdateEventArgs, ValueTask>

GuildScheduledEventCreate

Sent when a guild scheduled event is created. The inner payload is a GuildScheduledEvent object.

public event Func<GatewayClient, GuildScheduledEvent, ValueTask>? GuildScheduledEventCreate

Event Type

Func<GatewayClient, GuildScheduledEvent, ValueTask>

Remarks


Required Intents: GuildScheduledEvents
Optional Intents: None

GuildScheduledEventDelete

Sent when a guild scheduled event is deleted. The inner payload is a GuildScheduledEvent object.

public event Func<GatewayClient, GuildScheduledEvent, ValueTask>? GuildScheduledEventDelete

Event Type

Func<GatewayClient, GuildScheduledEvent, ValueTask>

Remarks


Required Intents: GuildScheduledEvents
Optional Intents: None

GuildScheduledEventUpdate

Sent when a guild scheduled event is updated. The inner payload is a GuildScheduledEvent object.

public event Func<GatewayClient, GuildScheduledEvent, ValueTask>? GuildScheduledEventUpdate

Event Type

Func<GatewayClient, GuildScheduledEvent, ValueTask>

Remarks


Required Intents: GuildScheduledEvents
Optional Intents: None

GuildScheduledEventUserAdd

Sent when a user has subscribed to a guild scheduled event.

public event Func<GatewayClient, GuildScheduledEventUserEventArgs, ValueTask>? GuildScheduledEventUserAdd

Event Type

Func<GatewayClient, GuildScheduledEventUserEventArgs, ValueTask>

Remarks


Required Intents: GuildScheduledEvents
Optional Intents: None

GuildScheduledEventUserRemove

Sent when a user has unsubscribed from a guild scheduled event.

public event Func<GatewayClient, GuildScheduledEventUserEventArgs, ValueTask>? GuildScheduledEventUserRemove

Event Type

Func<GatewayClient, GuildScheduledEventUserEventArgs, ValueTask>

Remarks


Required Intents: GuildScheduledEvents
Optional Intents: None

GuildStickersUpdate

Sent when a guild's stickers have been updated.

public event Func<GatewayClient, GuildStickersUpdateEventArgs, ValueTask>? GuildStickersUpdate

Event Type

Func<GatewayClient, GuildStickersUpdateEventArgs, ValueTask>

Remarks


Required Intents: GuildEmojisAndStickers
Optional Intents: None

GuildThreadCreate

Sent when a thread is created, relevant to the bot, or when the current user is added to a thread. The inner payload is an IGuildChannel object.

public event Func<GatewayClient, GuildThreadCreateEventArgs, ValueTask>? GuildThreadCreate

Event Type

Func<GatewayClient, GuildThreadCreateEventArgs, ValueTask>

Remarks


Required Intents: Guilds
Optional Intents: None

GuildThreadDelete

Sent when a thread relevant to the bot is deleted. The inner payload is a subset of an IGuildChannel object.

public event Func<GatewayClient, GuildThreadDeleteEventArgs, ValueTask>? GuildThreadDelete

Event Type

Func<GatewayClient, GuildThreadDeleteEventArgs, ValueTask>

Remarks


Required Intents: Guilds
Optional Intents: None

GuildThreadListSync

Sent when the current user gains access to a channel.

public event Func<GatewayClient, GuildThreadListSyncEventArgs, ValueTask>? GuildThreadListSync

Event Type

Func<GatewayClient, GuildThreadListSyncEventArgs, ValueTask>

Remarks


Required Intents: Guilds
Optional Intents: None

GuildThreadUpdate

Sent when a thread is updated. This is not sent with new messages, those are tracked by MessageCreate. The inner payload is an IGuildChannel object.

public event Func<GatewayClient, GuildThread, ValueTask>? GuildThreadUpdate

Event Type

Func<GatewayClient, GuildThread, ValueTask>

Remarks


Required Intents: Guilds
Optional Intents: None

GuildThreadUserUpdate

Sent when the GuildThreadUser object for the bot is updated. This event is largely just a signal that you are a member of the thread. The inner payload is a GuildThreadUserUpdateEventArgs object with a set GuildId.

public event Func<GatewayClient, GuildThreadUserUpdateEventArgs, ValueTask>? GuildThreadUserUpdate

Event Type

Func<GatewayClient, GuildThreadUserUpdateEventArgs, ValueTask>

Remarks


Required Intents: Guilds
Optional Intents: None

GuildThreadUsersUpdate

Sent when anyone is added to or removed from a thread.

public event Func<GatewayClient, GuildThreadUsersUpdateEventArgs, ValueTask>? GuildThreadUsersUpdate

Event Type

Func<GatewayClient, GuildThreadUsersUpdateEventArgs, ValueTask>

Remarks


Required Intents: Guilds, GuildUsers*
Optional Intents:

  • GuildUsers For receiving this event when other users are added / removed, otherwise this event will only fire for the bot's user.


*Must also be enabled in the developer portal.

GuildUpdate

Sent when a guild is updated. The inner payload is a Guild object.

public event Func<GatewayClient, Guild, ValueTask>? GuildUpdate

Event Type

Func<GatewayClient, Guild, ValueTask>

Remarks


Required Intents: Guilds
Optional Intents: None

GuildUserAdd

Sent when a new user joins a guild. The inner payload is a GuildUser object with an extra guild_id key.

public event Func<GatewayClient, GuildUser, ValueTask>? GuildUserAdd

Event Type

Func<GatewayClient, GuildUser, ValueTask>

Remarks


Required Intents: GuildUsers*
Optional Intents: None

*Must also be enabled in the developer portal.

GuildUserChunk

Sent in response to RequestGuildUsersAsync(GuildUsersRequestProperties, WebSocketPayloadProperties?, CancellationToken). You can use the ChunkIndex and ChunkCount to calculate how many chunks are left for your request.

public event Func<GatewayClient, GuildUserChunkEventArgs, ValueTask>? GuildUserChunk

Event Type

Func<GatewayClient, GuildUserChunkEventArgs, ValueTask>

Remarks


Required Intents: None
Optional Intents: None

GuildUserRemove

Sent when a user is removed from a guild (leave/kick/ban).

public event Func<GatewayClient, GuildUserRemoveEventArgs, ValueTask>? GuildUserRemove

Event Type

Func<GatewayClient, GuildUserRemoveEventArgs, ValueTask>

Remarks


Required Intents: GuildUsers*
Optional Intents: None

*Must also be enabled in the developer portal.

GuildUserUpdate

Sent when a guild user is updated. This will also fire when the GuildUser object of a guild user changes.

public event Func<GatewayClient, GuildUser, ValueTask>? GuildUserUpdate

Event Type

Func<GatewayClient, GuildUser, ValueTask>

Remarks


Required Intents: GuildUsers*
Optional Intents: None

*Must also be enabled in the developer portal.

InteractionCreate

Sent when a user uses an interaction. Inner payload is an Interaction.

public event Func<GatewayClient, Interaction, ValueTask>? InteractionCreate

Event Type

Func<GatewayClient, Interaction, ValueTask>

Remarks


Required Intents: None
Optional Intents: None

InviteCreate

Sent when a new invite to a channel is created. Only sent if the bot has the ManageChannels permission for the relevant channel.

public event Func<GatewayClient, Invite, ValueTask>? InviteCreate

Event Type

Func<GatewayClient, Invite, ValueTask>

Remarks


Required Intents: GuildInvites
Optional Intents: None

InviteDelete

Sent when an invite is deleted. Only sent if the bot has the ManageChannels permission for the relevant channel.

public event Func<GatewayClient, InviteDeleteEventArgs, ValueTask>? InviteDelete

Event Type

Func<GatewayClient, InviteDeleteEventArgs, ValueTask>

Remarks


Required Intents: GuildInvites
Optional Intents: None

LatencyUpdate

public event Func<GatewayClient, TimeSpan, ValueTask>? LatencyUpdate

Event Type

Func<GatewayClient, TimeSpan, ValueTask>

Log

public event Func<GatewayClient, LogMessage, ValueTask>? Log

Event Type

Func<GatewayClient, LogMessage, ValueTask>

MessageCreate

Sent when a message is created. The inner payload is a message object with set GuildId, and Author fields.

public event Func<GatewayClient, Message, ValueTask>? MessageCreate

Event Type

Func<GatewayClient, Message, ValueTask>

Remarks


Required Intents: GuildMessages, DirectMessages*
Optional Intents:

  • MessageContent For receiving Content, Embeds, Attachments and Embeds.
    This does not apply to:
    • Content in messages sent by the bot.
    • Content in DMs with the bot.
    • Content in which the bot is mentioned.
    • Content of messages a message context menu command is used on.


*Ephemeral messages do not use the guild channel. Because of this, they are tied to the DirectMessages intent, and the message object won't include a GuildId or Author.

MessageDelete

Sent when a message is deleted.

public event Func<GatewayClient, MessageDeleteEventArgs, ValueTask>? MessageDelete

Event Type

Func<GatewayClient, MessageDeleteEventArgs, ValueTask>

Remarks


Required Intents: GuildMessages, DirectMessages
Optional Intents: None

MessageDeleteBulk

Sent when multiple messages are deleted at once.

public event Func<GatewayClient, MessageDeleteBulkEventArgs, ValueTask>? MessageDeleteBulk

Event Type

Func<GatewayClient, MessageDeleteBulkEventArgs, ValueTask>

Remarks


Required Intents: GuildMessages
Optional Intents: None

MessagePollVoteAdd

public event Func<GatewayClient, MessagePollVoteEventArgs, ValueTask>? MessagePollVoteAdd

Event Type

Func<GatewayClient, MessagePollVoteEventArgs, ValueTask>

MessagePollVoteRemove

public event Func<GatewayClient, MessagePollVoteEventArgs, ValueTask>? MessagePollVoteRemove

Event Type

Func<GatewayClient, MessagePollVoteEventArgs, ValueTask>

MessageReactionAdd

Sent when a user adds a reaction to a message.

public event Func<GatewayClient, MessageReactionAddEventArgs, ValueTask>? MessageReactionAdd

Event Type

Func<GatewayClient, MessageReactionAddEventArgs, ValueTask>

Remarks


Required Intents: GuildMessageReactions, DirectMessageReactions
Optional Intents: None

MessageReactionRemove

Sent when a user removes a reaction from a message.

public event Func<GatewayClient, MessageReactionRemoveEventArgs, ValueTask>? MessageReactionRemove

Event Type

Func<GatewayClient, MessageReactionRemoveEventArgs, ValueTask>

Remarks


Required Intents: GuildMessageReactions, DirectMessageReactions
Optional Intents: None

MessageReactionRemoveAll

Sent when a user explicitly removes all reactions from a message.

public event Func<GatewayClient, MessageReactionRemoveAllEventArgs, ValueTask>? MessageReactionRemoveAll

Event Type

Func<GatewayClient, MessageReactionRemoveAllEventArgs, ValueTask>

Remarks


Required Intents: GuildMessageReactions, DirectMessageReactions
Optional Intents: None

MessageReactionRemoveEmoji

Sent when a user removes all instances of a given emoji from the reactions of a message.

public event Func<GatewayClient, MessageReactionRemoveEmojiEventArgs, ValueTask>? MessageReactionRemoveEmoji

Event Type

Func<GatewayClient, MessageReactionRemoveEmojiEventArgs, ValueTask>

Remarks


Required Intents: GuildMessageReactions, DirectMessageReactions
Optional Intents: None

MessageUpdate

Sent when a message is updated. The inner payload is a message object with set GuildId, and Author fields.

public event Func<GatewayClient, Message, ValueTask>? MessageUpdate

Event Type

Func<GatewayClient, Message, ValueTask>

Remarks


Required Intents: GuildMessages, DirectMessages*
Optional Intents:

  • MessageContent For receiving Content, Embeds, Attachments and Embeds.
    This does not apply to:
    • Content in messages sent by the bot.
    • Content in DMs with the bot.
    • Content in which the bot is mentioned.
    • Content of messages a message context menu command is used on.


*Ephemeral messages do not use the guild channel. Because of this, they are tied to the DirectMessages intent, and the message object won't include a GuildId or Author.

PresenceUpdate

Sent when a user's presence or info, such as their name or avatar, is updated. Requires the GuildPresences intent. The user object within this event can be partial, with the ID being the only required field, everything else is optional. Along with this limitation, no fields are required, and the types of the fields are not validated. You should expect any combination of fields and types within this event.

public event Func<GatewayClient, Presence, ValueTask>? PresenceUpdate

Event Type

Func<GatewayClient, Presence, ValueTask>

Remarks


Required Intents: GuildPresences*
Optional Intents: None

*Must also be enabled in the developer portal.

Ready

The ready event is dispatched when a client has completed the initial handshake with the Gateway (for new sessions). The ready event contains all the state required for a client to begin interacting with the rest of the platform.

public event Func<GatewayClient, ReadyEventArgs, ValueTask>? Ready

Event Type

Func<GatewayClient, ReadyEventArgs, ValueTask>

Remarks

Required Intents: None
Optional Intents: None

Resume

public event Func<GatewayClient, ValueTask>? Resume

Event Type

Func<GatewayClient, ValueTask>

RoleCreate

Sent when a guild role is created.

public event Func<GatewayClient, Role, ValueTask>? RoleCreate

Event Type

Func<GatewayClient, Role, ValueTask>

Remarks


Required Intents: Guilds
Optional Intents: None

RoleDelete

Sent when a guild role is deleted.

public event Func<GatewayClient, RoleDeleteEventArgs, ValueTask>? RoleDelete

Event Type

Func<GatewayClient, RoleDeleteEventArgs, ValueTask>

Remarks


Required Intents: Guilds
Optional Intents: None

RoleUpdate

Sent when a guild role is updated.

public event Func<GatewayClient, Role, ValueTask>? RoleUpdate

Event Type

Func<GatewayClient, Role, ValueTask>

Remarks


Required Intents: Guilds
Optional Intents: None

StageInstanceCreate

Sent when a StageInstance is created (i.e. the Stage is now 'live'). Inner payload is a StageInstance.

public event Func<GatewayClient, StageInstance, ValueTask>? StageInstanceCreate

Event Type

Func<GatewayClient, StageInstance, ValueTask>

Remarks


Required Intents: Guilds
Optional Intents: None

StageInstanceDelete

Sent when a StageInstance is deleted (i.e. the Stage has been closed). Inner payload is a StageInstance.

public event Func<GatewayClient, StageInstance, ValueTask>? StageInstanceDelete

Event Type

Func<GatewayClient, StageInstance, ValueTask>

Remarks


Required Intents: Guilds
Optional Intents: None

StageInstanceUpdate

Sent when a StageInstance is updated. Inner payload is a StageInstance.

public event Func<GatewayClient, StageInstance, ValueTask>? StageInstanceUpdate

Event Type

Func<GatewayClient, StageInstance, ValueTask>

Remarks


Required Intents: Guilds
Optional Intents: None

TypingStart

Sent when a user starts typing in a channel, and fires again every 10 seconds while they continue typing.

public event Func<GatewayClient, TypingStartEventArgs, ValueTask>? TypingStart

Event Type

Func<GatewayClient, TypingStartEventArgs, ValueTask>

Remarks


Required Intents: GuildMessageTyping, DirectMessageTyping
Optional Intents: None

UnknownEvent

An unknown event.

public event Func<GatewayClient, UnknownEventEventArgs, ValueTask>? UnknownEvent

Event Type

Func<GatewayClient, UnknownEventEventArgs, ValueTask>

VoiceChannelEffectSend

Sent when someone sends an effect, such as an emoji reaction or a soundboard sound, in a voice channel the current user is connected to. Inner payload is a VoiceChannelEffectSendEventArgs object.

public event Func<GatewayClient, VoiceChannelEffectSendEventArgs, ValueTask>? VoiceChannelEffectSend

Event Type

Func<GatewayClient, VoiceChannelEffectSendEventArgs, ValueTask>

Remarks


Required Intents: GuildVoiceStates
Optional Intents: None

VoiceServerUpdate

Sent when a guild's voice server is updated. This is sent when initially connecting to voice, and when the current voice instance fails over to a new server.

public event Func<GatewayClient, VoiceServerUpdateEventArgs, ValueTask>? VoiceServerUpdate

Event Type

Func<GatewayClient, VoiceServerUpdateEventArgs, ValueTask>

Remarks


Required Intents: None
Optional Intents: None

VoiceStateUpdate

Sent when someone joins/leaves/moves voice channels. Inner payload is a VoiceState object.

public event Func<GatewayClient, VoiceState, ValueTask>? VoiceStateUpdate

Event Type

Func<GatewayClient, VoiceState, ValueTask>

Remarks


Required Intents: GuildVoiceStates
Optional Intents: None

WebhooksUpdate

Sent when a guild channel's webhook is created, updated, or deleted.

public event Func<GatewayClient, WebhooksUpdateEventArgs, ValueTask>? WebhooksUpdate

Event Type

Func<GatewayClient, WebhooksUpdateEventArgs, ValueTask>

Remarks


Required Intents: GuildWebhooks
Optional Intents: None