mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-06 09:56:09 +00:00
@ -39,6 +39,7 @@ __all__ = (
|
||||
'Intents',
|
||||
'MemberCacheFlags',
|
||||
'ApplicationFlags',
|
||||
'ChannelFlags',
|
||||
)
|
||||
|
||||
BF = TypeVar('BF', bound='BaseFlags')
|
||||
@ -1175,3 +1176,39 @@ class ApplicationFlags(BaseFlags):
|
||||
""":class:`bool`: Returns ``True`` if the application is unverified and is allowed to
|
||||
read message content in guilds."""
|
||||
return 1 << 19
|
||||
|
||||
|
||||
@fill_with_flags()
|
||||
class ChannelFlags(BaseFlags):
|
||||
r"""Wraps up the Discord :class:`~discord.abc.GuildChannel` or :class:`Thread` flags.
|
||||
|
||||
.. container:: operations
|
||||
|
||||
.. describe:: x == y
|
||||
|
||||
Checks if two channel flags are equal.
|
||||
.. describe:: x != y
|
||||
|
||||
Checks if two channel flags are not equal.
|
||||
.. describe:: hash(x)
|
||||
|
||||
Return the flag's hash.
|
||||
.. describe:: iter(x)
|
||||
|
||||
Returns an iterator of ``(name, value)`` pairs. This allows it
|
||||
to be, for example, constructed as a dict or a list of pairs.
|
||||
Note that aliases are not shown.
|
||||
|
||||
.. versionadded:: 2.0
|
||||
|
||||
Attributes
|
||||
-----------
|
||||
value: :class:`int`
|
||||
The raw value. You should query flags via the properties
|
||||
rather than using this raw value.
|
||||
"""
|
||||
|
||||
@flag_value
|
||||
def pinned(self):
|
||||
""":class:`bool`: Returns ``True`` if the"""
|
||||
return 1 << 1
|
||||
|
Reference in New Issue
Block a user