using Discord.Rest; using System; using System.Collections.Generic; using System.Threading.Tasks; namespace Discord.WebSocket { public partial class BaseSocketClient { #region Channels /// Fired when a channel is created. /// /// /// This event is fired when a generic channel has been created. The event handler must return a /// and accept a as its parameter. /// /// /// The newly created channel is passed into the event handler parameter. The given channel type may /// include, but not limited to, Private Channels (DM, Group), Guild Channels (Text, Voice, Category); /// see the derived classes of for more details. /// /// /// /// /// public event Func ChannelCreated { add { _channelCreatedEvent.Add(value); } remove { _channelCreatedEvent.Remove(value); } } internal readonly AsyncEvent> _channelCreatedEvent = new AsyncEvent>(); /// Fired when a channel is destroyed. /// /// /// This event is fired when a generic channel has been destroyed. The event handler must return a /// and accept a as its parameter. /// /// /// The destroyed channel is passed into the event handler parameter. The given channel type may /// include, but not limited to, Private Channels (DM, Group), Guild Channels (Text, Voice, Category); /// see the derived classes of for more details. /// /// /// /// /// public event Func ChannelDestroyed { add { _channelDestroyedEvent.Add(value); } remove { _channelDestroyedEvent.Remove(value); } } internal readonly AsyncEvent> _channelDestroyedEvent = new AsyncEvent>(); /// Fired when a channel is updated. /// /// /// This event is fired when a generic channel has been updated. The event handler must return a /// and accept 2 as its parameters. /// /// /// The original (prior to update) channel is passed into the first , while /// the updated channel is passed into the second. The given channel type may include, but not limited /// to, Private Channels (DM, Group), Guild Channels (Text, Voice, Category); see the derived classes of /// for more details. /// /// /// /// /// public event Func ChannelUpdated { add { _channelUpdatedEvent.Add(value); } remove { _channelUpdatedEvent.Remove(value); } } internal readonly AsyncEvent> _channelUpdatedEvent = new AsyncEvent>(); /// /// Fired when status of a voice channel is updated. /// /// /// The previous state of the channel is passed into the first parameter; the updated channel is passed into the second one. /// public event Func, string, string, Task> VoiceChannelStatusUpdated { add { _voiceChannelStatusUpdated.Add(value); } remove { _voiceChannelStatusUpdated.Remove(value); } } internal readonly AsyncEvent, string, string, Task>> _voiceChannelStatusUpdated = new(); #endregion #region Messages /// Fired when a message is received. /// /// /// This event is fired when a message is received. The event handler must return a /// and accept a as its parameter. /// /// /// The message that is sent to the client is passed into the event handler parameter as /// . This message may be a system message (i.e. /// ) or a user message (i.e. . See the /// derived classes of for more details. /// /// /// /// The example below checks if the newly received message contains the target user. /// /// public event Func MessageReceived { add { _messageReceivedEvent.Add(value); } remove { _messageReceivedEvent.Remove(value); } } internal readonly AsyncEvent> _messageReceivedEvent = new AsyncEvent>(); /// Fired when a message is deleted. /// /// /// This event is fired when a message is deleted. The event handler must return a /// and accept a and /// as its parameters. /// /// /// /// It is not possible to retrieve the message via /// ; the message cannot be retrieved by Discord /// after the message has been deleted. /// /// If caching is enabled via , the /// entity will contain the deleted message; otherwise, in event /// that the message cannot be retrieved, the snowflake ID of the message is preserved in the /// . /// /// /// The source channel of the removed message will be passed into the /// parameter. /// /// /// /// /// public event Func, Cacheable, Task> MessageDeleted { add { _messageDeletedEvent.Add(value); } remove { _messageDeletedEvent.Remove(value); } } internal readonly AsyncEvent, Cacheable, Task>> _messageDeletedEvent = new AsyncEvent, Cacheable, Task>>(); /// Fired when multiple messages are bulk deleted. /// /// /// The event will not be fired for individual messages contained in this event. /// /// /// This event is fired when multiple messages are bulk deleted. The event handler must return a /// and accept an and /// as its parameters. /// /// /// /// It is not possible to retrieve the message via /// ; the message cannot be retrieved by Discord /// after the message has been deleted. /// /// If caching is enabled via , the /// entity will contain the deleted message; otherwise, in event /// that the message cannot be retrieved, the snowflake ID of the message is preserved in the /// . /// /// /// The source channel of the removed message will be passed into the /// parameter. /// /// public event Func>, Cacheable, Task> MessagesBulkDeleted { add { _messagesBulkDeletedEvent.Add(value); } remove { _messagesBulkDeletedEvent.Remove(value); } } internal readonly AsyncEvent>, Cacheable, Task>> _messagesBulkDeletedEvent = new AsyncEvent>, Cacheable, Task>>(); /// Fired when a message is updated. /// /// /// This event is fired when a message is updated. The event handler must return a /// and accept a , , /// and as its parameters. /// /// /// If caching is enabled via , the /// entity will contain the original message; otherwise, in event /// that the message cannot be retrieved, the snowflake ID of the message is preserved in the /// . /// /// /// The updated message will be passed into the parameter. /// /// /// The source channel of the updated message will be passed into the /// parameter. /// /// public event Func, SocketMessage, ISocketMessageChannel, Task> MessageUpdated { add { _messageUpdatedEvent.Add(value); } remove { _messageUpdatedEvent.Remove(value); } } internal readonly AsyncEvent, SocketMessage, ISocketMessageChannel, Task>> _messageUpdatedEvent = new AsyncEvent, SocketMessage, ISocketMessageChannel, Task>>(); /// Fired when a reaction is added to a message. /// /// /// This event is fired when a reaction is added to a user message. The event handler must return a /// and accept a , an /// , and a as its parameter. /// /// /// If caching is enabled via , the /// entity will contain the original message; otherwise, in event /// that the message cannot be retrieved, the snowflake ID of the message is preserved in the /// . /// /// /// The source channel of the reaction addition will be passed into the /// parameter. /// /// /// The reaction that was added will be passed into the parameter. /// /// /// When fetching the reaction from this event, a user may not be provided under /// . Please see the documentation of the property for more /// information. /// /// /// /// /// public event Func, Cacheable, SocketReaction, Task> ReactionAdded { add { _reactionAddedEvent.Add(value); } remove { _reactionAddedEvent.Remove(value); } } internal readonly AsyncEvent, Cacheable, SocketReaction, Task>> _reactionAddedEvent = new AsyncEvent, Cacheable, SocketReaction, Task>>(); /// Fired when a reaction is removed from a message. public event Func, Cacheable, SocketReaction, Task> ReactionRemoved { add { _reactionRemovedEvent.Add(value); } remove { _reactionRemovedEvent.Remove(value); } } internal readonly AsyncEvent, Cacheable, SocketReaction, Task>> _reactionRemovedEvent = new AsyncEvent, Cacheable, SocketReaction, Task>>(); /// Fired when all reactions to a message are cleared. public event Func, Cacheable, Task> ReactionsCleared { add { _reactionsClearedEvent.Add(value); } remove { _reactionsClearedEvent.Remove(value); } } internal readonly AsyncEvent, Cacheable, Task>> _reactionsClearedEvent = new AsyncEvent, Cacheable, Task>>(); /// /// Fired when all reactions to a message with a specific emote are removed. /// /// /// /// This event is fired when all reactions to a message with a specific emote are removed. /// The event handler must return a and accept a and /// a as its parameters. /// /// /// The channel where this message was sent will be passed into the parameter. /// /// /// The emoji that all reactions had and were removed will be passed into the parameter. /// /// public event Func, Cacheable, IEmote, Task> ReactionsRemovedForEmote { add { _reactionsRemovedForEmoteEvent.Add(value); } remove { _reactionsRemovedForEmoteEvent.Remove(value); } } internal readonly AsyncEvent, Cacheable, IEmote, Task>> _reactionsRemovedForEmoteEvent = new AsyncEvent, Cacheable, IEmote, Task>>(); #endregion #region Roles /// Fired when a role is created. public event Func RoleCreated { add { _roleCreatedEvent.Add(value); } remove { _roleCreatedEvent.Remove(value); } } internal readonly AsyncEvent> _roleCreatedEvent = new AsyncEvent>(); /// Fired when a role is deleted. public event Func RoleDeleted { add { _roleDeletedEvent.Add(value); } remove { _roleDeletedEvent.Remove(value); } } internal readonly AsyncEvent> _roleDeletedEvent = new AsyncEvent>(); /// Fired when a role is updated. public event Func RoleUpdated { add { _roleUpdatedEvent.Add(value); } remove { _roleUpdatedEvent.Remove(value); } } internal readonly AsyncEvent> _roleUpdatedEvent = new AsyncEvent>(); #endregion #region Guilds /// Fired when the connected account joins a guild. public event Func JoinedGuild { add { _joinedGuildEvent.Add(value); } remove { _joinedGuildEvent.Remove(value); } } internal readonly AsyncEvent> _joinedGuildEvent = new AsyncEvent>(); /// Fired when the connected account leaves a guild. public event Func LeftGuild { add { _leftGuildEvent.Add(value); } remove { _leftGuildEvent.Remove(value); } } internal readonly AsyncEvent> _leftGuildEvent = new AsyncEvent>(); /// Fired when a guild becomes available. public event Func GuildAvailable { add { _guildAvailableEvent.Add(value); } remove { _guildAvailableEvent.Remove(value); } } internal readonly AsyncEvent> _guildAvailableEvent = new AsyncEvent>(); /// Fired when a guild becomes unavailable. public event Func GuildUnavailable { add { _guildUnavailableEvent.Add(value); } remove { _guildUnavailableEvent.Remove(value); } } internal readonly AsyncEvent> _guildUnavailableEvent = new AsyncEvent>(); /// Fired when offline guild members are downloaded. public event Func GuildMembersDownloaded { add { _guildMembersDownloadedEvent.Add(value); } remove { _guildMembersDownloadedEvent.Remove(value); } } internal readonly AsyncEvent> _guildMembersDownloadedEvent = new AsyncEvent>(); /// Fired when a guild is updated. public event Func GuildUpdated { add { _guildUpdatedEvent.Add(value); } remove { _guildUpdatedEvent.Remove(value); } } internal readonly AsyncEvent> _guildUpdatedEvent = new AsyncEvent>(); /// Fired when a user leaves without agreeing to the member screening public event Func, SocketGuild, Task> GuildJoinRequestDeleted { add { _guildJoinRequestDeletedEvent.Add(value); } remove { _guildJoinRequestDeletedEvent.Remove(value); } } internal readonly AsyncEvent, SocketGuild, Task>> _guildJoinRequestDeletedEvent = new AsyncEvent, SocketGuild, Task>>(); #endregion #region Guild Events /// /// Fired when a guild event is created. /// public event Func GuildScheduledEventCreated { add { _guildScheduledEventCreated.Add(value); } remove { _guildScheduledEventCreated.Remove(value); } } internal readonly AsyncEvent> _guildScheduledEventCreated = new AsyncEvent>(); /// /// Fired when a guild event is updated. /// public event Func, SocketGuildEvent, Task> GuildScheduledEventUpdated { add { _guildScheduledEventUpdated.Add(value); } remove { _guildScheduledEventUpdated.Remove(value); } } internal readonly AsyncEvent, SocketGuildEvent, Task>> _guildScheduledEventUpdated = new AsyncEvent, SocketGuildEvent, Task>>(); /// /// Fired when a guild event is cancelled. /// public event Func GuildScheduledEventCancelled { add { _guildScheduledEventCancelled.Add(value); } remove { _guildScheduledEventCancelled.Remove(value); } } internal readonly AsyncEvent> _guildScheduledEventCancelled = new AsyncEvent>(); /// /// Fired when a guild event is completed. /// public event Func GuildScheduledEventCompleted { add { _guildScheduledEventCompleted.Add(value); } remove { _guildScheduledEventCompleted.Remove(value); } } internal readonly AsyncEvent> _guildScheduledEventCompleted = new AsyncEvent>(); /// /// Fired when a guild event is started. /// public event Func GuildScheduledEventStarted { add { _guildScheduledEventStarted.Add(value); } remove { _guildScheduledEventStarted.Remove(value); } } internal readonly AsyncEvent> _guildScheduledEventStarted = new AsyncEvent>(); public event Func, SocketGuildEvent, Task> GuildScheduledEventUserAdd { add { _guildScheduledEventUserAdd.Add(value); } remove { _guildScheduledEventUserAdd.Remove(value); } } internal readonly AsyncEvent, SocketGuildEvent, Task>> _guildScheduledEventUserAdd = new AsyncEvent, SocketGuildEvent, Task>>(); public event Func, SocketGuildEvent, Task> GuildScheduledEventUserRemove { add { _guildScheduledEventUserRemove.Add(value); } remove { _guildScheduledEventUserRemove.Remove(value); } } internal readonly AsyncEvent, SocketGuildEvent, Task>> _guildScheduledEventUserRemove = new AsyncEvent, SocketGuildEvent, Task>>(); #endregion #region Integrations /// Fired when an integration is created. public event Func IntegrationCreated { add { _integrationCreated.Add(value); } remove { _integrationCreated.Remove(value); } } internal readonly AsyncEvent> _integrationCreated = new AsyncEvent>(); /// Fired when an integration is updated. public event Func IntegrationUpdated { add { _integrationUpdated.Add(value); } remove { _integrationUpdated.Remove(value); } } internal readonly AsyncEvent> _integrationUpdated = new AsyncEvent>(); /// Fired when an integration is deleted. public event Func, Task> IntegrationDeleted { add { _integrationDeleted.Add(value); } remove { _integrationDeleted.Remove(value); } } internal readonly AsyncEvent, Task>> _integrationDeleted = new AsyncEvent, Task>>(); #endregion #region Users /// Fired when a user joins a guild. public event Func UserJoined { add { _userJoinedEvent.Add(value); } remove { _userJoinedEvent.Remove(value); } } internal readonly AsyncEvent> _userJoinedEvent = new AsyncEvent>(); /// Fired when a user leaves a guild. public event Func UserLeft { add { _userLeftEvent.Add(value); } remove { _userLeftEvent.Remove(value); } } internal readonly AsyncEvent> _userLeftEvent = new AsyncEvent>(); /// Fired when a user is banned from a guild. public event Func UserBanned { add { _userBannedEvent.Add(value); } remove { _userBannedEvent.Remove(value); } } internal readonly AsyncEvent> _userBannedEvent = new AsyncEvent>(); /// Fired when a user is unbanned from a guild. public event Func UserUnbanned { add { _userUnbannedEvent.Add(value); } remove { _userUnbannedEvent.Remove(value); } } internal readonly AsyncEvent> _userUnbannedEvent = new AsyncEvent>(); /// Fired when a user is updated. public event Func UserUpdated { add { _userUpdatedEvent.Add(value); } remove { _userUpdatedEvent.Remove(value); } } internal readonly AsyncEvent> _userUpdatedEvent = new AsyncEvent>(); /// Fired when a guild member is updated. public event Func, SocketGuildUser, Task> GuildMemberUpdated { add { _guildMemberUpdatedEvent.Add(value); } remove { _guildMemberUpdatedEvent.Remove(value); } } internal readonly AsyncEvent, SocketGuildUser, Task>> _guildMemberUpdatedEvent = new AsyncEvent, SocketGuildUser, Task>>(); /// Fired when a user joins, leaves, or moves voice channels. public event Func UserVoiceStateUpdated { add { _userVoiceStateUpdatedEvent.Add(value); } remove { _userVoiceStateUpdatedEvent.Remove(value); } } internal readonly AsyncEvent> _userVoiceStateUpdatedEvent = new AsyncEvent>(); /// Fired when the bot connects to a Discord voice server. public event Func VoiceServerUpdated { add { _voiceServerUpdatedEvent.Add(value); } remove { _voiceServerUpdatedEvent.Remove(value); } } internal readonly AsyncEvent> _voiceServerUpdatedEvent = new AsyncEvent>(); /// Fired when the connected account is updated. public event Func CurrentUserUpdated { add { _selfUpdatedEvent.Add(value); } remove { _selfUpdatedEvent.Remove(value); } } internal readonly AsyncEvent> _selfUpdatedEvent = new AsyncEvent>(); /// Fired when a user starts typing. public event Func, Cacheable, Task> UserIsTyping { add { _userIsTypingEvent.Add(value); } remove { _userIsTypingEvent.Remove(value); } } internal readonly AsyncEvent, Cacheable, Task>> _userIsTypingEvent = new AsyncEvent, Cacheable, Task>>(); /// Fired when a user joins a group channel. public event Func RecipientAdded { add { _recipientAddedEvent.Add(value); } remove { _recipientAddedEvent.Remove(value); } } internal readonly AsyncEvent> _recipientAddedEvent = new AsyncEvent>(); /// Fired when a user is removed from a group channel. public event Func RecipientRemoved { add { _recipientRemovedEvent.Add(value); } remove { _recipientRemovedEvent.Remove(value); } } internal readonly AsyncEvent> _recipientRemovedEvent = new AsyncEvent>(); #endregion #region Presence /// Fired when a users presence is updated. public event Func PresenceUpdated { add { _presenceUpdated.Add(value); } remove { _presenceUpdated.Remove(value); } } internal readonly AsyncEvent> _presenceUpdated = new AsyncEvent>(); #endregion #region Invites /// /// Fired when an invite is created. /// /// /// /// This event is fired when an invite is created. The event handler must return a /// and accept a as its parameter. /// /// /// The invite created will be passed into the parameter. /// /// public event Func InviteCreated { add { _inviteCreatedEvent.Add(value); } remove { _inviteCreatedEvent.Remove(value); } } internal readonly AsyncEvent> _inviteCreatedEvent = new AsyncEvent>(); /// /// Fired when an invite is deleted. /// /// /// /// This event is fired when an invite is deleted. The event handler must return /// a and accept a and /// as its parameter. /// /// /// The channel where this invite was created will be passed into the parameter. /// /// /// The code of the deleted invite will be passed into the parameter. /// /// public event Func InviteDeleted { add { _inviteDeletedEvent.Add(value); } remove { _inviteDeletedEvent.Remove(value); } } internal readonly AsyncEvent> _inviteDeletedEvent = new AsyncEvent>(); #endregion #region Interactions /// /// Fired when an Interaction is created. This event covers all types of interactions including but not limited to: buttons, select menus, slash commands, autocompletes. /// /// /// /// This event is fired when an interaction is created. The event handler must return a /// and accept a as its parameter. /// /// /// The interaction created will be passed into the parameter. /// /// public event Func InteractionCreated { add { _interactionCreatedEvent.Add(value); } remove { _interactionCreatedEvent.Remove(value); } } internal readonly AsyncEvent> _interactionCreatedEvent = new AsyncEvent>(); /// /// Fired when a button is clicked and its interaction is received. /// public event Func ButtonExecuted { add => _buttonExecuted.Add(value); remove => _buttonExecuted.Remove(value); } internal readonly AsyncEvent> _buttonExecuted = new AsyncEvent>(); /// /// Fired when a select menu is used and its interaction is received. /// public event Func SelectMenuExecuted { add => _selectMenuExecuted.Add(value); remove => _selectMenuExecuted.Remove(value); } internal readonly AsyncEvent> _selectMenuExecuted = new AsyncEvent>(); /// /// Fired when a slash command is used and its interaction is received. /// public event Func SlashCommandExecuted { add => _slashCommandExecuted.Add(value); remove => _slashCommandExecuted.Remove(value); } internal readonly AsyncEvent> _slashCommandExecuted = new AsyncEvent>(); /// /// Fired when a user command is used and its interaction is received. /// public event Func UserCommandExecuted { add => _userCommandExecuted.Add(value); remove => _userCommandExecuted.Remove(value); } internal readonly AsyncEvent> _userCommandExecuted = new AsyncEvent>(); /// /// Fired when a message command is used and its interaction is received. /// public event Func MessageCommandExecuted { add => _messageCommandExecuted.Add(value); remove => _messageCommandExecuted.Remove(value); } internal readonly AsyncEvent> _messageCommandExecuted = new AsyncEvent>(); /// /// Fired when an autocomplete is used and its interaction is received. /// public event Func AutocompleteExecuted { add => _autocompleteExecuted.Add(value); remove => _autocompleteExecuted.Remove(value); } internal readonly AsyncEvent> _autocompleteExecuted = new AsyncEvent>(); /// /// Fired when a modal is submitted. /// public event Func ModalSubmitted { add => _modalSubmitted.Add(value); remove => _modalSubmitted.Remove(value); } internal readonly AsyncEvent> _modalSubmitted = new AsyncEvent>(); /// /// Fired when a guild application command is created. /// /// /// /// This event is fired when an application command is created. The event handler must return a /// and accept a as its parameter. /// /// /// The command that was deleted will be passed into the parameter. /// /// /// This event is an undocumented discord event and may break at any time, its not recommended to rely on this event /// /// public event Func ApplicationCommandCreated { add { _applicationCommandCreated.Add(value); } remove { _applicationCommandCreated.Remove(value); } } internal readonly AsyncEvent> _applicationCommandCreated = new AsyncEvent>(); /// /// Fired when a guild application command is updated. /// /// /// /// This event is fired when an application command is updated. The event handler must return a /// and accept a as its parameter. /// /// /// The command that was deleted will be passed into the parameter. /// /// /// This event is an undocumented discord event and may break at any time, its not recommended to rely on this event /// /// public event Func ApplicationCommandUpdated { add { _applicationCommandUpdated.Add(value); } remove { _applicationCommandUpdated.Remove(value); } } internal readonly AsyncEvent> _applicationCommandUpdated = new AsyncEvent>(); /// /// Fired when a guild application command is deleted. /// /// /// /// This event is fired when an application command is deleted. The event handler must return a /// and accept a as its parameter. /// /// /// The command that was deleted will be passed into the parameter. /// /// /// This event is an undocumented discord event and may break at any time, its not recommended to rely on this event /// /// public event Func ApplicationCommandDeleted { add { _applicationCommandDeleted.Add(value); } remove { _applicationCommandDeleted.Remove(value); } } internal readonly AsyncEvent> _applicationCommandDeleted = new AsyncEvent>(); /// /// Fired when a thread is created within a guild, or when the current user is added to a thread. /// public event Func ThreadCreated { add { _threadCreated.Add(value); } remove { _threadCreated.Remove(value); } } internal readonly AsyncEvent> _threadCreated = new AsyncEvent>(); /// /// Fired when a thread is updated within a guild. /// public event Func, SocketThreadChannel, Task> ThreadUpdated { add { _threadUpdated.Add(value); } remove { _threadUpdated.Remove(value); } } internal readonly AsyncEvent, SocketThreadChannel, Task>> _threadUpdated = new(); /// /// Fired when a thread is deleted. /// public event Func, Task> ThreadDeleted { add { _threadDeleted.Add(value); } remove { _threadDeleted.Remove(value); } } internal readonly AsyncEvent, Task>> _threadDeleted = new AsyncEvent, Task>>(); /// /// Fired when a user joins a thread /// public event Func ThreadMemberJoined { add { _threadMemberJoined.Add(value); } remove { _threadMemberJoined.Remove(value); } } internal readonly AsyncEvent> _threadMemberJoined = new AsyncEvent>(); /// /// Fired when a user leaves a thread /// public event Func ThreadMemberLeft { add { _threadMemberLeft.Add(value); } remove { _threadMemberLeft.Remove(value); } } internal readonly AsyncEvent> _threadMemberLeft = new AsyncEvent>(); /// /// Fired when a stage is started. /// public event Func StageStarted { add { _stageStarted.Add(value); } remove { _stageStarted.Remove(value); } } internal readonly AsyncEvent> _stageStarted = new AsyncEvent>(); /// /// Fired when a stage ends. /// public event Func StageEnded { add { _stageEnded.Add(value); } remove { _stageEnded.Remove(value); } } internal readonly AsyncEvent> _stageEnded = new AsyncEvent>(); /// /// Fired when a stage is updated. /// public event Func StageUpdated { add { _stageUpdated.Add(value); } remove { _stageUpdated.Remove(value); } } internal readonly AsyncEvent> _stageUpdated = new AsyncEvent>(); /// /// Fired when a user requests to speak within a stage channel. /// public event Func RequestToSpeak { add { _requestToSpeak.Add(value); } remove { _requestToSpeak.Remove(value); } } internal readonly AsyncEvent> _requestToSpeak = new AsyncEvent>(); /// /// Fired when a speaker is added in a stage channel. /// public event Func SpeakerAdded { add { _speakerAdded.Add(value); } remove { _speakerAdded.Remove(value); } } internal readonly AsyncEvent> _speakerAdded = new AsyncEvent>(); /// /// Fired when a speaker is removed from a stage channel. /// public event Func SpeakerRemoved { add { _speakerRemoved.Add(value); } remove { _speakerRemoved.Remove(value); } } internal readonly AsyncEvent> _speakerRemoved = new AsyncEvent>(); /// /// Fired when a sticker in a guild is created. /// public event Func GuildStickerCreated { add { _guildStickerCreated.Add(value); } remove { _guildStickerCreated.Remove(value); } } internal readonly AsyncEvent> _guildStickerCreated = new AsyncEvent>(); /// /// Fired when a sticker in a guild is updated. /// public event Func GuildStickerUpdated { add { _guildStickerUpdated.Add(value); } remove { _guildStickerUpdated.Remove(value); } } internal readonly AsyncEvent> _guildStickerUpdated = new AsyncEvent>(); /// /// Fired when a sticker in a guild is deleted. /// public event Func GuildStickerDeleted { add { _guildStickerDeleted.Add(value); } remove { _guildStickerDeleted.Remove(value); } } internal readonly AsyncEvent> _guildStickerDeleted = new AsyncEvent>(); #endregion #region Webhooks /// /// Fired when a webhook is modified, moved, or deleted. If the webhook was /// moved the channel represents the destination channel, not the source. /// public event Func WebhooksUpdated { add { _webhooksUpdated.Add(value); } remove { _webhooksUpdated.Remove(value); } } internal readonly AsyncEvent> _webhooksUpdated = new AsyncEvent>(); #endregion #region Audit Logs /// /// Fired when a guild audit log entry is created. /// public event Func AuditLogCreated { add { _auditLogCreated.Add(value); } remove { _auditLogCreated.Remove(value); } } internal readonly AsyncEvent> _auditLogCreated = new(); #endregion #region AutoModeration /// /// Fired when an auto moderation rule is created. /// public event Func AutoModRuleCreated { add => _autoModRuleCreated.Add(value); remove => _autoModRuleCreated.Remove(value); } internal readonly AsyncEvent> _autoModRuleCreated = new(); /// /// Fired when an auto moderation rule is modified. /// public event Func, SocketAutoModRule, Task> AutoModRuleUpdated { add => _autoModRuleUpdated.Add(value); remove => _autoModRuleUpdated.Remove(value); } internal readonly AsyncEvent, SocketAutoModRule, Task>> _autoModRuleUpdated = new(); /// /// Fired when an auto moderation rule is deleted. /// public event Func AutoModRuleDeleted { add => _autoModRuleDeleted.Add(value); remove => _autoModRuleDeleted.Remove(value); } internal readonly AsyncEvent> _autoModRuleDeleted = new(); /// /// Fired when an auto moderation rule is triggered by a user. /// public event Func AutoModActionExecuted { add => _autoModActionExecuted.Add(value); remove => _autoModActionExecuted.Remove(value); } internal readonly AsyncEvent> _autoModActionExecuted = new(); #endregion #region App Subscriptions /// /// Fired when a user subscribes to a SKU. /// public event Func EntitlementCreated { add { _entitlementCreated.Add(value); } remove { _entitlementCreated.Remove(value); } } internal readonly AsyncEvent> _entitlementCreated = new(); /// /// Fired when a subscription to a SKU is updated. /// public event Func, SocketEntitlement, Task> EntitlementUpdated { add { _entitlementUpdated.Add(value); } remove { _entitlementUpdated.Remove(value); } } internal readonly AsyncEvent, SocketEntitlement, Task>> _entitlementUpdated = new(); /// /// Fired when a user's entitlement is deleted. /// public event Func, Task> EntitlementDeleted { add { _entitlementDeleted.Add(value); } remove { _entitlementDeleted.Remove(value); } } internal readonly AsyncEvent, Task>> _entitlementDeleted = new(); #endregion } }