Add SPAMMER user flag

This commit is contained in:
Kowlin 2022-02-18 04:14:21 +01:00 committed by GitHub
parent 783513726f
commit bae0cdf2a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 0 deletions

View File

@ -463,6 +463,7 @@ class UserFlags(Enum):
verified_bot_developer = 131072
discord_certified_moderator = 262144
bot_http_interactions = 524288
spammer = 1048576
class ActivityType(Enum):

View File

@ -428,6 +428,14 @@ class PublicUserFlags(BaseFlags):
"""
return UserFlags.bot_http_interactions.value
@flag_value
def spammer(self):
""":class:`bool`: Returns ``True`` if the user is flagged as a spammer by Discord.
.. versionadded:: 2.0
"""
return UserFlags.spammer.value
def all(self) -> List[UserFlags]:
"""List[:class:`UserFlags`]: Returns all public flags the user has."""
return [public_flag for public_flag in UserFlags if self._has_flag(public_flag.value)]

View File

@ -1368,6 +1368,11 @@ of :class:`enum.Enum`.
The user is a bot that only uses HTTP interactions and is shown in the online member list.
.. versionadded:: 2.0
.. attribute:: spammer
The user is flagged as a spammer by Discord.
..versionadded:: 2.0
.. class:: ActivityType