Add support for new message types related to premium guilds.
This commit is contained in:
parent
2b27a7a9d5
commit
5dce3410e6
@ -76,14 +76,18 @@ class ChannelType(Enum):
|
|||||||
|
|
||||||
@fast_lookup
|
@fast_lookup
|
||||||
class MessageType(Enum):
|
class MessageType(Enum):
|
||||||
default = 0
|
default = 0
|
||||||
recipient_add = 1
|
recipient_add = 1
|
||||||
recipient_remove = 2
|
recipient_remove = 2
|
||||||
call = 3
|
call = 3
|
||||||
channel_name_change = 4
|
channel_name_change = 4
|
||||||
channel_icon_change = 5
|
channel_icon_change = 5
|
||||||
pins_add = 6
|
pins_add = 6
|
||||||
new_member = 7
|
new_member = 7
|
||||||
|
premium_guild_subscription = 8
|
||||||
|
premium_guild_tier_1 = 9
|
||||||
|
premium_guild_tier_2 = 10
|
||||||
|
premium_guild_tier_3 = 11
|
||||||
|
|
||||||
@fast_lookup
|
@fast_lookup
|
||||||
class VoiceRegion(Enum):
|
class VoiceRegion(Enum):
|
||||||
|
@ -603,6 +603,18 @@ class Message:
|
|||||||
else:
|
else:
|
||||||
return '{0.author.name} started a call \N{EM DASH} Join the call.'.format(self)
|
return '{0.author.name} started a call \N{EM DASH} Join the call.'.format(self)
|
||||||
|
|
||||||
|
if self.type is MessageType.premium_guild_subscription:
|
||||||
|
return '{0.author.name} just boosted the server!'.format(self)
|
||||||
|
|
||||||
|
if self.type is MessageType.premium_guild_tier_1:
|
||||||
|
return '{0.author.name} just boosted the server! {0.guild} has achieved **Level 1!**'.format(self)
|
||||||
|
|
||||||
|
if self.type is MessageType.premium_guild_tier_2:
|
||||||
|
return '{0.author.name} just boosted the server! {0.guild} has achieved **Level 2!**'.format(self)
|
||||||
|
|
||||||
|
if self.type is MessageType.premium_guild_tier_3:
|
||||||
|
return '{0.author.name} just boosted the server! {0.guild} has achieved **Level 3!**'.format(self)
|
||||||
|
|
||||||
async def delete(self, *, delay=None):
|
async def delete(self, *, delay=None):
|
||||||
"""|coro|
|
"""|coro|
|
||||||
|
|
||||||
|
16
docs/api.rst
16
docs/api.rst
@ -720,6 +720,22 @@ All enumerations are subclasses of `enum`_.
|
|||||||
|
|
||||||
The system message denoting that a new member has joined a Guild.
|
The system message denoting that a new member has joined a Guild.
|
||||||
|
|
||||||
|
.. attribute:: premium_guild_subscription
|
||||||
|
|
||||||
|
The system message denoting that a member has "nitro boosted" a guild.
|
||||||
|
.. attribute:: premium_guild_tier_1
|
||||||
|
|
||||||
|
The system message denoting that a member has "nitro boosted" a guild
|
||||||
|
and it achieved level 1.
|
||||||
|
.. attribute:: premium_guild_tier_2
|
||||||
|
|
||||||
|
The system message denoting that a member has "nitro boosted" a guild
|
||||||
|
and it achieved level 2.
|
||||||
|
.. attribute:: premium_guild_tier_3
|
||||||
|
|
||||||
|
The system message denoting that a member has "nitro boosted" a guild
|
||||||
|
and it achieved level 3.
|
||||||
|
|
||||||
.. class:: ActivityType
|
.. class:: ActivityType
|
||||||
|
|
||||||
Specifies the type of :class:`Activity`. This is used to check how to
|
Specifies the type of :class:`Activity`. This is used to check how to
|
||||||
|
Loading…
x
Reference in New Issue
Block a user