diff --git a/discord/automod.py b/discord/automod.py index 3f9e3cad6..1903dd69f 100644 --- a/discord/automod.py +++ b/discord/automod.py @@ -76,7 +76,7 @@ class AutoModRuleAction: A custom message which will be shown to a user when their message is blocked. Passing this sets :attr:`type` to :attr:`~AutoModRuleActionType.block_message`. - .. versionadded:: 2.2 + .. versionadded:: 2.0 """ __slots__ = ('type', 'channel_id', 'duration', 'custom_message') diff --git a/discord/channel.py b/discord/channel.py index f60186ed7..dc06cbe78 100644 --- a/discord/channel.py +++ b/discord/channel.py @@ -1449,7 +1449,7 @@ class StageChannel(VocalGuildChannel): The last message ID of the message sent to this channel. It may *not* point to an existing or valid message. - .. versionadded:: 2.2 + .. versionadded:: 2.0 slowmode_delay: :class:`int` The number of seconds a member must wait between sending messages in this channel. A value of ``0`` denotes that it is disabled. diff --git a/discord/colour.py b/discord/colour.py index 6a9f7b8d5..cbcf9f903 100644 --- a/discord/colour.py +++ b/discord/colour.py @@ -459,8 +459,8 @@ class Colour: .. versionadded:: 1.5 - .. versionchanged:: 2.2 - Updated colour from previous ``0x36393F`` to reflect discord theme changes. + .. versionchanged:: 2.0 + Updated colour from previous ``0x36393F`` to reflect Discord theme changes. """ return cls(0x313338) @@ -490,7 +490,7 @@ class Colour: .. colour:: #2B2D31 - .. versionadded:: 2.2 + .. versionadded:: 2.0 """ return cls(0x2B2D31) @@ -500,7 +500,7 @@ class Colour: .. colour:: #EEEFF1 - .. versionadded:: 2.2 + .. versionadded:: 2.0 """ return cls(0xEEEFF1) diff --git a/discord/enums.py b/discord/enums.py index db8a52eb8..e3102cf3e 100644 --- a/discord/enums.py +++ b/discord/enums.py @@ -286,11 +286,11 @@ class MessageType(Enum): 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 + stage_start = 27 + stage_end = 28 + stage_speaker = 29 + stage_raise_hand = 30 + stage_topic = 31 guild_application_premium_subscription = 32 diff --git a/discord/guild.py b/discord/guild.py index 0a576c9c8..2dec3d420 100644 --- a/discord/guild.py +++ b/discord/guild.py @@ -1520,20 +1520,20 @@ class Guild(Hashable): bitrate: :class:`int` The channel's preferred audio bitrate in bits per second. - .. versionadded:: 2.2 + .. versionadded:: 2.0 user_limit: :class:`int` The channel's limit for number of members that can be in a voice channel. - .. versionadded:: 2.2 + .. versionadded:: 2.0 rtc_region: Optional[:class:`str`] The region for the voice channel's voice communication. A value of ``None`` indicates automatic voice region detection. - .. versionadded:: 2.2 + .. versionadded:: 2.0 video_quality_mode: :class:`VideoQualityMode` The camera video quality for the voice channel's participants. - .. versionadded:: 2.2 + .. versionadded:: 2.0 reason: Optional[:class:`str`] The reason for creating this channel. Shows up on the audit log. diff --git a/discord/message.py b/discord/message.py index f27421c3a..153c7f0c8 100644 --- a/discord/message.py +++ b/discord/message.py @@ -1899,6 +1899,21 @@ class Message(PartialMessage, Hashable): months = '1 month' if total_months == 1 else f'{total_months} months' return f'{self.author.name} joined {self.role_subscription.tier_name} and has been a subscriber of {self.guild} for {months}!' + if self.type is MessageType.stage_start: + return f'{self.author.name} started **{self.content}**.' + + if self.type is MessageType.stage_end: + return f'{self.author.name} ended **{self.content}**.' + + if self.type is MessageType.stage_speaker: + return f'{self.author.name} is now a speaker.' + + if self.type is MessageType.stage_raise_hand: + return f'{self.author.name} requested to speak.' + + if self.type is MessageType.stage_topic: + return f'{self.author.name} changed Stage topic: **{self.content}**.' + # Fallback for unknown message types return self.content diff --git a/discord/webhook/async_.py b/discord/webhook/async_.py index f0ce982d9..a48169cc5 100644 --- a/discord/webhook/async_.py +++ b/discord/webhook/async_.py @@ -978,7 +978,7 @@ class Webhook(BaseWebhook): attach the client's internal state. If ``session`` is not given while this is given then the client's internal session will be used. - .. versionadded:: 2.2 + .. versionadded:: 2.0 bot_token: Optional[:class:`str`] The bot authentication token for authenticated requests involving the webhook. @@ -1043,7 +1043,7 @@ class Webhook(BaseWebhook): attach the client's internal state. If ``session`` is not given while this is given then the client's internal session will be used. - .. versionadded:: 2.2 + .. versionadded:: 2.0 bot_token: Optional[:class:`str`] The bot authentication token for authenticated requests involving the webhook. diff --git a/docs/api.rst b/docs/api.rst index e5fc33f04..e1b1c50fd 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -1716,6 +1716,31 @@ of :class:`enum.Enum`. The system message sent when a user is given an advertisement to purchase a premium tier for an application during an interaction. + .. versionadded:: 2.0 + .. attribute:: stage_start + + The system message sent when the stage starts. + + .. versionadded:: 2.0 + .. attribute:: stage_end + + The system message sent when the stage ends. + + .. versionadded:: 2.0 + .. attribute:: stage_speaker + + The system message sent when the stage speaker changes. + + .. versionadded:: 2.0 + .. attribute:: stage_raise_hand + + The system message sent when a user is requesting to speak by raising their hands. + + .. versionadded:: 2.0 + .. attribute:: stage_topic + + The system message sent when the stage topic changes. + .. versionadded:: 2.0 .. attribute:: guild_application_premium_subscription