diff --git a/DisCatSharp/Enums/DiscordEvent.cs b/DisCatSharp/Enums/DiscordEvent.cs index bd5783082..d1a1825a4 100644 --- a/DisCatSharp/Enums/DiscordEvent.cs +++ b/DisCatSharp/Enums/DiscordEvent.cs @@ -1,146 +1,144 @@ // This file is part of the DisCatSharp project, based off DSharpPlus. // // Copyright (c) 2021-2022 AITSYS // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #nullable enable using System; namespace DisCatSharp; /// /// Methods marked with this attribute will be registered as event handling methods /// if the associated type / an associated instance is being registered. /// [AttributeUsage(AttributeTargets.Method)] public class EventAttribute : Attribute { internal readonly string? EventName; public EventAttribute() { } /// The name of the event. /// The attributed method's name will be used if null. public EventAttribute(DiscordEvent evtn) { this.EventName = evtn.ToString(); } } /// /// Classes marked with this attribute will be considered for event handler registration from an assembly. /// [AttributeUsage(AttributeTargets.Class, Inherited = false)] public class EventHandlerAttribute : Attribute { } /// /// All events available in for use with . /// public enum DiscordEvent { ApplicationCommandCreated, ApplicationCommandDeleted, ApplicationCommandPermissionsUpdated, ApplicationCommandUpdated, ChannelCreated, ChannelDeleted, ChannelPinsUpdated, ChannelUpdated, ClientErrored, ComponentInteractionCreated, ContextMenuInteractionCreated, DmChannelDeleted, EmbeddedActivityUpdated, GuildApplicationCommandCountUpdated, GuildAvailable, GuildBanAdded, GuildBanRemoved, GuildCreated, GuildDeleted, GuildDownloadCompleted, GuildEmojisUpdated, GuildIntegrationCreated, GuildIntegrationDeleted, GuildIntegrationsUpdated, GuildIntegrationUpdated, GuildMemberAdded, GuildMemberRemoved, GuildMembersChunked, GuildMemberTimeoutAdded, GuildMemberTimeoutChanged, GuildMemberTimeoutRemoved, GuildMemberUpdated, GuildRoleCreated, GuildRoleDeleted, GuildRoleUpdated, GuildScheduledEventCreated, GuildScheduledEventDeleted, GuildScheduledEventUpdated, GuildScheduledEventUserAdded, GuildScheduledEventUserRemoved, GuildStickersUpdated, GuildUnavailable, GuildUpdated, Heartbeated, InteractionCreated, InviteCreated, InviteDeleted, MessageAcknowledged, MessageCreated, MessageDeleted, MessageReactionAdded, MessageReactionRemoved, MessageReactionRemovedEmoji, MessageReactionsCleared, MessagesBulkDeleted, MessageUpdated, PayloadReceived, PresenceUpdated, RateLimitHit, Ready, Resumed, SocketClosed, SocketErrored, SocketOpened, StageInstanceCreated, StageInstanceDeleted, StageInstanceUpdated, ThreadCreated, ThreadDeleted, ThreadListSynced, ThreadMembersUpdated, ThreadMemberUpdated, ThreadUpdated, TypingStarted, UnknownEvent, UserSettingsUpdated, UserUpdated, VoiceServerUpdated, VoiceStateUpdated, WebhooksUpdated, Zombied, AutomodRuleCreated, AutomodRuleUpdated, AutomodRuleDeleted, - AutomodActionExecuted, - GuildJoined = GuildCreated, - JoinedGuild = GuildCreated + AutomodActionExecuted }