From 8e52db1f1b7dd9831f6fe47019d0302108d33dc5 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Tue, 10 Jan 2023 18:10:30 -0500 Subject: [PATCH] Add new message types to MessageType enum --- discord/enums.py | 7 +++++++ discord/types/message.py | 4 +++- docs/api.rst | 11 +++++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/discord/enums.py b/discord/enums.py index 20d799f04..451505861 100644 --- a/discord/enums.py +++ b/discord/enums.py @@ -233,6 +233,13 @@ class MessageType(Enum): context_menu_command = 23 auto_moderation_action = 24 role_subscription_purchase = 25 + interaction_premium_upsell = 26 + # stage_start = 27 + # stage_end = 28 + # stage_speaker = 29 + # stage_raise_hand = 30 + # stage_topic = 31 + guild_application_premium_subscription = 32 class SpeakingState(Enum): diff --git a/discord/types/message.py b/discord/types/message.py index 7ca77b084..f89725992 100644 --- a/discord/types/message.py +++ b/discord/types/message.py @@ -100,7 +100,9 @@ class RoleSubscriptionData(TypedDict): is_renewal: bool -MessageType = Literal[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15, 18, 19, 20, 21, 22, 23, 24, 25] +MessageType = Literal[ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32 +] class Message(PartialMessage): diff --git a/docs/api.rst b/docs/api.rst index ed22283b6..6a3772c19 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -1622,6 +1622,17 @@ of :class:`enum.Enum`. The system message sent when a user purchases or renews a role subscription. + .. versionadded:: 2.2 + .. attribute:: interaction_premium_upsell + + The system message sent when a user is given an advertisement to purchase a premium tier for + an application during an interaction. + + .. versionadded:: 2.2 + .. attribute:: guild_application_premium_subscription + + The system message sent when an application's premium subscription is purchased for the guild. + .. versionadded:: 2.2 .. class:: UserFlags