Browse Source

chore: Add more params to MessageFlags.components_v2 docstring

pull/10166/head
DA-344 3 months ago
parent
commit
cba602d472
  1. 4
      discord/flags.py
  2. 5
      discord/ui/view.py

4
discord/flags.py

@ -503,7 +503,9 @@ class MessageFlags(BaseFlags):
def components_v2(self):
""":class:`bool`: Returns ``True`` if the message has Discord's v2 components.
Does not allow sending any ``content``, ``embed``, or ``embeds``.
Does not allow sending any ``content``, ``embed``, ``embeds``, ``stickers``, or ``poll``.
.. versionadded:: 2.6
"""
return 32768

5
discord/ui/view.py

@ -567,8 +567,8 @@ class View(BaseView):
This object must be inherited to create a UI within Discord.
.. versionadded:: 2.0
.. deprecated:: 2.6
This class is deprecated and will be removed in a future version. Use :class:`LayoutView` instead.
Parameters
-----------
@ -581,7 +581,8 @@ class View(BaseView):
def __init_subclass__(cls) -> None:
warnings.warn(
'discord.ui.View and subclasses are deprecated, use discord.ui.LayoutView instead',
'discord.ui.View and subclasses are deprecated and will be removed in'
'a future version, use discord.ui.LayoutView instead',
DeprecationWarning,
)
super().__init_subclass__()

Loading…
Cancel
Save