mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-06-07 20:28:38 +00:00
Add Message.forward flag
This commit is contained in:
parent
354ae4208c
commit
c8ecbd8d10
@ -1530,10 +1530,11 @@ class Messageable:
|
|||||||
.. versionadded:: 1.4
|
.. versionadded:: 1.4
|
||||||
|
|
||||||
reference: Union[:class:`~discord.Message`, :class:`~discord.MessageReference`, :class:`~discord.PartialMessage`]
|
reference: Union[:class:`~discord.Message`, :class:`~discord.MessageReference`, :class:`~discord.PartialMessage`]
|
||||||
A reference to the :class:`~discord.Message` to which you are replying, this can be created using
|
A reference to the :class:`~discord.Message` to which you are referencing, this can be created using
|
||||||
:meth:`~discord.Message.to_reference` or passed directly as a :class:`~discord.Message`. You can control
|
:meth:`~discord.Message.to_reference` or passed directly as a :class:`~discord.Message`.
|
||||||
whether this mentions the author of the referenced message using the :attr:`~discord.AllowedMentions.replied_user`
|
In the event of a replying reference, you can control whether this mentions the author of the referenced
|
||||||
attribute of ``allowed_mentions`` or by setting ``mention_author``.
|
message using the :attr:`~discord.AllowedMentions.replied_user` attribute of ``allowed_mentions`` or by
|
||||||
|
setting ``mention_author``.
|
||||||
|
|
||||||
.. versionadded:: 1.6
|
.. versionadded:: 1.6
|
||||||
|
|
||||||
|
@ -135,7 +135,7 @@ class BaseFlags:
|
|||||||
setattr(self, key, value)
|
setattr(self, key, value)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def _from_value(cls, value):
|
def _from_value(cls, value: int) -> Self:
|
||||||
self = cls.__new__(cls)
|
self = cls.__new__(cls)
|
||||||
self.value = value
|
self.value = value
|
||||||
return self
|
return self
|
||||||
@ -490,6 +490,14 @@ class MessageFlags(BaseFlags):
|
|||||||
"""
|
"""
|
||||||
return 8192
|
return 8192
|
||||||
|
|
||||||
|
@flag_value
|
||||||
|
def forwarded(self):
|
||||||
|
""":class:`bool`: Returns ``True`` if the message is a forwarded message.
|
||||||
|
|
||||||
|
.. versionadded:: 2.5
|
||||||
|
"""
|
||||||
|
return 16384
|
||||||
|
|
||||||
|
|
||||||
@fill_with_flags()
|
@fill_with_flags()
|
||||||
class PublicUserFlags(BaseFlags):
|
class PublicUserFlags(BaseFlags):
|
||||||
|
@ -615,7 +615,7 @@ class MessageReference:
|
|||||||
guild_id: Optional[:class:`int`]
|
guild_id: Optional[:class:`int`]
|
||||||
The guild id of the message referenced.
|
The guild id of the message referenced.
|
||||||
fail_if_not_exists: :class:`bool`
|
fail_if_not_exists: :class:`bool`
|
||||||
Whether replying to the referenced message should raise :class:`HTTPException`
|
Whether the referenced message should raise :class:`HTTPException`
|
||||||
if the message no longer exists or Discord could not fetch the message.
|
if the message no longer exists or Discord could not fetch the message.
|
||||||
|
|
||||||
.. versionadded:: 1.7
|
.. versionadded:: 1.7
|
||||||
@ -627,8 +627,6 @@ class MessageReference:
|
|||||||
If the message was resolved at a prior point but has since been deleted then
|
If the message was resolved at a prior point but has since been deleted then
|
||||||
this will be of type :class:`DeletedReferencedMessage`.
|
this will be of type :class:`DeletedReferencedMessage`.
|
||||||
|
|
||||||
Currently, this is mainly the replied to message when a user replies to a message.
|
|
||||||
|
|
||||||
.. versionadded:: 1.6
|
.. versionadded:: 1.6
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@ -680,7 +678,7 @@ class MessageReference:
|
|||||||
message: :class:`~discord.Message`
|
message: :class:`~discord.Message`
|
||||||
The message to be converted into a reference.
|
The message to be converted into a reference.
|
||||||
fail_if_not_exists: :class:`bool`
|
fail_if_not_exists: :class:`bool`
|
||||||
Whether replying to the referenced message should raise :class:`HTTPException`
|
Whether the referenced message should raise :class:`HTTPException`
|
||||||
if the message no longer exists or Discord could not fetch the message.
|
if the message no longer exists or Discord could not fetch the message.
|
||||||
|
|
||||||
.. versionadded:: 1.7
|
.. versionadded:: 1.7
|
||||||
@ -1869,7 +1867,7 @@ class PartialMessage(Hashable):
|
|||||||
Parameters
|
Parameters
|
||||||
----------
|
----------
|
||||||
fail_if_not_exists: :class:`bool`
|
fail_if_not_exists: :class:`bool`
|
||||||
Whether replying using the message reference should raise :class:`HTTPException`
|
Whether the referenced message should raise :class:`HTTPException`
|
||||||
if the message no longer exists or Discord could not fetch the message.
|
if the message no longer exists or Discord could not fetch the message.
|
||||||
|
|
||||||
.. versionadded:: 1.7
|
.. versionadded:: 1.7
|
||||||
|
Loading…
x
Reference in New Issue
Block a user