Browse Source

Merge 6b7a5b2dc2 into 2f1f5fe2e2

pull/10284/merge
Steve C 3 days ago
committed by GitHub
parent
commit
4f539b2c89
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 1
      discord/enums.py
  2. 9
      discord/flags.py
  3. 3
      discord/message.py
  4. 1
      discord/types/message.py
  5. 8
      docs/api.rst

1
discord/enums.py

@ -275,6 +275,7 @@ class MessageType(Enum):
guild_incident_report_false_alarm = 39
purchase_notification = 44
poll_result = 46
emoji_added = 63
class SpeakingState(Enum):

9
discord/flags.py

@ -371,6 +371,15 @@ class SystemChannelFlags(BaseFlags):
"""
return 32
@flag_value
def emoji_added(self):
""":class:`bool`: Returns ``True`` if the system channel is used for
emoji added notifications.
.. versionadded:: 2.7
"""
return 256
@fill_with_flags()
class MessageFlags(BaseFlags):

3
discord/message.py

@ -2865,6 +2865,9 @@ class Message(PartialMessage, Hashable):
)
return f"{self.author.display_name}'s poll {poll_title.value} has closed." # type: ignore
if self.type is MessageType.emoji_added:
return f'{self.author.name} added a new emoji, {self.content}'
# Fallback for unknown message types
return ''

1
discord/types/message.py

@ -175,6 +175,7 @@ MessageType = Literal[
39,
44,
46,
63,
]

8
docs/api.rst

@ -1924,6 +1924,14 @@ of :class:`enum.Enum`.
The system message sent when a poll has closed.
.. versionadded:: 2.5
.. attribute:: emoji_added
The system message sent when a custom emoji is added to the guild.
.. versionadded:: 2.7
.. class:: UserFlags
Represents Discord User flags.

Loading…
Cancel
Save