mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-05-09 15:29:57 +00:00
Add BOT_HTTP_INTERACTIONS user flag
Adds UserFlags.bot_http_interactions and PublicUserFlags.bot_http_interactions See: discord/discord-api-docs#3903
This commit is contained in:
parent
d034264973
commit
820bde99e1
@ -462,6 +462,7 @@ class UserFlags(Enum):
|
||||
verified_bot = 65536
|
||||
verified_bot_developer = 131072
|
||||
discord_certified_moderator = 262144
|
||||
bot_http_interactions = 524288
|
||||
|
||||
|
||||
class ActivityType(Enum):
|
||||
|
@ -419,6 +419,15 @@ class PublicUserFlags(BaseFlags):
|
||||
"""
|
||||
return UserFlags.discord_certified_moderator.value
|
||||
|
||||
@flag_value
|
||||
def bot_http_interactions(self):
|
||||
""":class:`bool`: Returns ``True`` if the user is a bot that only uses HTTP interactions
|
||||
and is shown in the online member list.
|
||||
|
||||
.. versionadded:: 2.0
|
||||
"""
|
||||
return UserFlags.bot_http_interactions.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)]
|
||||
|
@ -1363,6 +1363,11 @@ of :class:`enum.Enum`.
|
||||
.. attribute:: discord_certified_moderator
|
||||
|
||||
The user is a Discord Certified Moderator.
|
||||
.. attribute:: bot_http_interactions
|
||||
|
||||
The user is a bot that only uses HTTP interactions and is shown in the online member list.
|
||||
|
||||
.. versionadded:: 2.0
|
||||
|
||||
.. class:: ActivityType
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user