Add initial support for forum channels

Closes #7652
This commit is contained in:
Rapptz
2022-04-06 22:42:18 -04:00
parent bc91e1667f
commit 23f6876492
12 changed files with 467 additions and 14 deletions

View File

@ -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