mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-07-01 15:50:02 +00:00
Add SPAMMER user flag
This commit is contained in:
parent
783513726f
commit
bae0cdf2a7
@ -463,6 +463,7 @@ class UserFlags(Enum):
|
|||||||
verified_bot_developer = 131072
|
verified_bot_developer = 131072
|
||||||
discord_certified_moderator = 262144
|
discord_certified_moderator = 262144
|
||||||
bot_http_interactions = 524288
|
bot_http_interactions = 524288
|
||||||
|
spammer = 1048576
|
||||||
|
|
||||||
|
|
||||||
class ActivityType(Enum):
|
class ActivityType(Enum):
|
||||||
|
@ -428,6 +428,14 @@ class PublicUserFlags(BaseFlags):
|
|||||||
"""
|
"""
|
||||||
return UserFlags.bot_http_interactions.value
|
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]:
|
def all(self) -> List[UserFlags]:
|
||||||
"""List[:class:`UserFlags`]: Returns all public flags the user has."""
|
"""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)]
|
return [public_flag for public_flag in UserFlags if self._has_flag(public_flag.value)]
|
||||||
|
@ -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.
|
The user is a bot that only uses HTTP interactions and is shown in the online member list.
|
||||||
|
|
||||||
.. versionadded:: 2.0
|
.. versionadded:: 2.0
|
||||||
|
.. attribute:: spammer
|
||||||
|
|
||||||
|
The user is flagged as a spammer by Discord.
|
||||||
|
|
||||||
|
..versionadded:: 2.0
|
||||||
|
|
||||||
.. class:: ActivityType
|
.. class:: ActivityType
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user