mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-22 08:44:10 +00:00
Add remaining v6 message types
This commit is contained in:
parent
7f05f7f6c0
commit
6f748e5da5
@ -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'
|
||||
|
@ -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|
|
||||
|
29
docs/api.rst
29
docs/api.rst
@ -1125,6 +1125,35 @@ of :class:`enum.Enum`.
|
||||
The system message denoting that an announcement channel has been followed.
|
||||
|
||||
.. versionadded:: 1.3
|
||||
.. attribute:: guild_stream
|
||||
|
||||
The system message denoting that a member is streaming in the guild.
|
||||
|
||||
.. versionadded:: 1.7
|
||||
.. attribute:: guild_discovery_disqualified
|
||||
|
||||
The system message denoting that the guild is no longer eligible for Server
|
||||
Discovery.
|
||||
|
||||
.. versionadded:: 1.7
|
||||
.. attribute:: guild_discovery_requalified
|
||||
|
||||
The system message denoting that the guild has become eligible again for Server
|
||||
Discovery.
|
||||
|
||||
.. versionadded:: 1.7
|
||||
.. attribute:: guild_discovery_grace_period_initial_warning
|
||||
|
||||
The system message denoting that the guild has failed to meet the Server
|
||||
Discovery requirements for one week.
|
||||
|
||||
.. versionadded:: 1.7
|
||||
.. attribute:: guild_discovery_grace_period_final_warning
|
||||
|
||||
The system message denoting that the guild has failed to meet the Server
|
||||
Discovery requirements for 3 weeks in a row.
|
||||
|
||||
.. versionadded:: 1.7
|
||||
|
||||
.. class:: ActivityType
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user