diff options
| author | Nadir Chowdhury <[email protected]> | 2021-02-23 08:57:11 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-02-23 03:57:11 -0500 |
| commit | 6f748e5da59e5c98504c14d52fcc00a8cce7041a (patch) | |
| tree | 5db6641c5eac038735746b36165824d97add5027 /discord | |
| parent | Add converter example (diff) | |
| download | discord.py-6f748e5da59e5c98504c14d52fcc00a8cce7041a.tar.xz discord.py-6f748e5da59e5c98504c14d52fcc00a8cce7041a.zip | |
Add remaining v6 message types
Diffstat (limited to 'discord')
| -rw-r--r-- | discord/enums.py | 31 | ||||
| -rw-r--r-- | discord/message.py | 15 |
2 files changed, 33 insertions, 13 deletions
diff --git a/discord/enums.py b/discord/enums.py index 721dbe47..93194788 100644 --- a/discord/enums.py +++ b/discord/enums.py @@ -163,19 +163,24 @@ class ChannelType(Enum): return self.name class MessageType(Enum): - default = 0 - recipient_add = 1 - recipient_remove = 2 - call = 3 - channel_name_change = 4 - channel_icon_change = 5 - pins_add = 6 - new_member = 7 - premium_guild_subscription = 8 - premium_guild_tier_1 = 9 - premium_guild_tier_2 = 10 - premium_guild_tier_3 = 11 - channel_follow_add = 12 + default = 0 + recipient_add = 1 + recipient_remove = 2 + call = 3 + channel_name_change = 4 + channel_icon_change = 5 + pins_add = 6 + new_member = 7 + premium_guild_subscription = 8 + premium_guild_tier_1 = 9 + premium_guild_tier_2 = 10 + premium_guild_tier_3 = 11 + channel_follow_add = 12 + guild_stream = 13 + guild_discovery_disqualified = 14 + guild_discovery_requalified = 15 + guild_discovery_grace_period_initial_warning = 16 + guild_discovery_grace_period_final_warning = 17 class VoiceRegion(Enum): us_west = 'us-west' diff --git a/discord/message.py b/discord/message.py index 535a401f..d9f9bccb 100644 --- a/discord/message.py +++ b/discord/message.py @@ -923,6 +923,21 @@ class Message(Hashable): if self.type is MessageType.channel_follow_add: return '{0.author.name} has added {0.content} to this channel'.format(self) + + if self.type is MessageType.guild_stream: + return '{0.author.name} is live! Now streaming {0.author.activity.name}'.format(self) + + if self.type is MessageType.guild_discovery_disqualified: + return 'This server has been removed from Server Discovery because it no longer passes all the requirements. Check Server Settings for more details.' + + if self.type is MessageType.guild_discovery_requalified: + return 'This server is eligible for Server Discovery again and has been automatically relisted!' + + if self.type is MessageType.guild_discovery_grace_period_initial_warning: + return 'This server has failed Discovery activity requirements for 1 week. If this server fails for 4 weeks in a row, it will be automatically removed from Discovery.' + + if self.type is MessageType.guild_discovery_grave_period_final_warning: + return 'This server has failed Discovery activity requirements for 3 weeks in a row. If this server fails for 1 more week, it will be removed from Discovery.' async def delete(self, *, delay=None): """|coro| |