From 0e2659ce2a4bbe355213b32bceed5d23f0a24959 Mon Sep 17 00:00:00 2001 From: Misha133 Date: Thu, 5 Jan 2023 12:56:52 +0300 Subject: [PATCH] Add new message types & error codes --- src/Discord.Net.Core/DiscordErrorCode.cs | 13 ++++--- .../Entities/Messages/MessageType.cs | 38 ++++++++++++++++++- 2 files changed, 45 insertions(+), 6 deletions(-) diff --git a/src/Discord.Net.Core/DiscordErrorCode.cs b/src/Discord.Net.Core/DiscordErrorCode.cs index 8301842d4..acdfbddc5 100644 --- a/src/Discord.Net.Core/DiscordErrorCode.cs +++ b/src/Discord.Net.Core/DiscordErrorCode.cs @@ -98,13 +98,14 @@ namespace Discord MaximumStickersReached = 30039, MaximumPruneRequestReached = 30040, MaximumGuildWidgetsReached = 30042, - #endregion - - #region General Request Errors (40XXX) BitrateIsTooHighForChannelOfThisType = 30052, MaximumNumberOfEditsReached = 30046, MaximumNumberOfPinnedThreadsInAForumChannelReached = 30047, MaximumNumberOfTagsInAForumChannelReached = 30048, + MaximumNumberOfWebhooksReached = 30058, + #endregion + + #region General Request Errors (40XXX) TokenUnauthorized = 40001, InvalidVerification = 40002, OpeningDMTooFast = 40003, @@ -118,10 +119,11 @@ namespace Discord ApplicationNameAlreadyExists = 40041, ApplicationInteractionFailedToSend = 40043, CannotSendAMessageInAForumChannel = 40058, - ThereAreNoTagsAvailableThatCanBeSetByNonModerators = 40066, - ATagIsRequiredToCreateAForumPostInThisChannel = 40067, InteractionHasAlreadyBeenAcknowledged = 40060, TagNamesMustBeUnique = 40061, + ServiceResourceIsBeingRateLimited = 40062, + ThereAreNoTagsAvailableThatCanBeSetByNonModerators = 40066, + ATagIsRequiredToCreateAForumPostInThisChannel = 40067, #endregion #region Action Preconditions/Checks (50XXX) @@ -160,6 +162,7 @@ namespace Discord InvalidFileUpload = 50046, CannotSelfRedeemGift = 50054, InvalidGuild = 50055, + InvalidRequestOrigin = 50067, InvalidMessageType = 50068, PaymentSourceRequiredForGift = 50070, CannotModifySystemWebhook = 50073, diff --git a/src/Discord.Net.Core/Entities/Messages/MessageType.cs b/src/Discord.Net.Core/Entities/Messages/MessageType.cs index b83f88434..be36d5967 100644 --- a/src/Discord.Net.Core/Entities/Messages/MessageType.cs +++ b/src/Discord.Net.Core/Entities/Messages/MessageType.cs @@ -99,12 +99,48 @@ namespace Discord /// ThreadStarterMessage = 21, /// - /// The message for a invite reminder. + /// The message for an invite reminder. /// GuildInviteReminder = 22, /// /// The message for a context menu command. /// ContextMenuCommand = 23, + /// + /// The message for an automod action. + /// + AutoModerationAction = 24, + /// + /// The message for a role subscription purchase. + /// + RoleSubscriptionPurchase = 25, + /// + /// The message for an interaction premium upsell. + /// + InteractionPremiumUpsell = 26, + /// + /// The message for a stage start. + /// + StageStart = 27, + /// + /// The message for a stage end. + /// + StageEnd = 28, + /// + /// The message for a stage speaker. + /// + StageSpeaker = 29, + /// + /// The message for a stage raise hand. + /// + StageRaiseHand = 30, + /// + /// The message for a stage raise hand. + /// + StageTopic = 31, + /// + /// The message for a guild application premium subscription. + /// + GuildApplicationPremiumSubscription = 32 } }