Add "new in version" missing in webhook documentation
This commit is contained in:
parent
b2c9c26841
commit
cbe7a1b3a2
@ -654,9 +654,13 @@ class WebhookMessage(Message):
|
|||||||
This should not be mixed with the ``embeds`` parameter.
|
This should not be mixed with the ``embeds`` parameter.
|
||||||
file: :class:`File`
|
file: :class:`File`
|
||||||
The file to upload. This cannot be mixed with ``files`` parameter.
|
The file to upload. This cannot be mixed with ``files`` parameter.
|
||||||
|
|
||||||
|
.. versionadded:: 2.0
|
||||||
files: List[:class:`File`]
|
files: List[:class:`File`]
|
||||||
A list of files to send with the content. This cannot be mixed with the
|
A list of files to send with the content. This cannot be mixed with the
|
||||||
``file`` parameter.
|
``file`` parameter.
|
||||||
|
|
||||||
|
.. versionadded:: 2.0
|
||||||
allowed_mentions: :class:`AllowedMentions`
|
allowed_mentions: :class:`AllowedMentions`
|
||||||
Controls the mentions being processed in this message.
|
Controls the mentions being processed in this message.
|
||||||
See :meth:`.abc.Messageable.send` for more information.
|
See :meth:`.abc.Messageable.send` for more information.
|
||||||
@ -664,6 +668,8 @@ class WebhookMessage(Message):
|
|||||||
The updated view to update this message with. If ``None`` is passed then
|
The updated view to update this message with. If ``None`` is passed then
|
||||||
the view is removed.
|
the view is removed.
|
||||||
|
|
||||||
|
.. versionadded:: 2.0
|
||||||
|
|
||||||
Raises
|
Raises
|
||||||
-------
|
-------
|
||||||
HTTPException
|
HTTPException
|
||||||
@ -774,11 +780,16 @@ class BaseWebhook(Hashable):
|
|||||||
self.source_guild: Optional[PartialWebhookGuild] = source_guild
|
self.source_guild: Optional[PartialWebhookGuild] = source_guild
|
||||||
|
|
||||||
def is_partial(self) -> bool:
|
def is_partial(self) -> bool:
|
||||||
""":class:`bool`: Whether the webhook is a "partial" webhook."""
|
""":class:`bool`: Whether the webhook is a "partial" webhook.
|
||||||
|
|
||||||
|
.. versionadded:: 2.0"""
|
||||||
return self.channel_id is None
|
return self.channel_id is None
|
||||||
|
|
||||||
def is_authenticated(self) -> bool:
|
def is_authenticated(self) -> bool:
|
||||||
""":class:`bool`: Whether the webhook is authenticated with a bot token."""
|
""":class:`bool`: Whether the webhook is authenticated with a bot token.
|
||||||
|
|
||||||
|
.. versionadded:: 2.0
|
||||||
|
"""
|
||||||
return self.auth_token is not None
|
return self.auth_token is not None
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@ -923,10 +934,14 @@ class Webhook(BaseWebhook):
|
|||||||
The session to use to send requests with. Note
|
The session to use to send requests with. Note
|
||||||
that the library does not manage the session and
|
that the library does not manage the session and
|
||||||
will not close it.
|
will not close it.
|
||||||
|
|
||||||
|
.. versionadded:: 2.0
|
||||||
bot_token: Optional[:class:`str`]
|
bot_token: Optional[:class:`str`]
|
||||||
The bot authentication token for authenticated requests
|
The bot authentication token for authenticated requests
|
||||||
involving the webhook.
|
involving the webhook.
|
||||||
|
|
||||||
|
.. versionadded:: 2.0
|
||||||
|
|
||||||
Returns
|
Returns
|
||||||
--------
|
--------
|
||||||
:class:`Webhook`
|
:class:`Webhook`
|
||||||
@ -953,10 +968,14 @@ class Webhook(BaseWebhook):
|
|||||||
The session to use to send requests with. Note
|
The session to use to send requests with. Note
|
||||||
that the library does not manage the session and
|
that the library does not manage the session and
|
||||||
will not close it.
|
will not close it.
|
||||||
|
|
||||||
|
.. versionadded:: 2.0
|
||||||
bot_token: Optional[:class:`str`]
|
bot_token: Optional[:class:`str`]
|
||||||
The bot authentication token for authenticated requests
|
The bot authentication token for authenticated requests
|
||||||
involving the webhook.
|
involving the webhook.
|
||||||
|
|
||||||
|
.. versionadded:: 2.0
|
||||||
|
|
||||||
Raises
|
Raises
|
||||||
-------
|
-------
|
||||||
InvalidArgument
|
InvalidArgument
|
||||||
@ -1004,6 +1023,8 @@ class Webhook(BaseWebhook):
|
|||||||
|
|
||||||
This could be used to get a full webhook from a partial webhook.
|
This could be used to get a full webhook from a partial webhook.
|
||||||
|
|
||||||
|
.. versionadded:: 2.0
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
When fetching with an unauthenticated webhook, i.e.
|
When fetching with an unauthenticated webhook, i.e.
|
||||||
@ -1056,6 +1077,8 @@ class Webhook(BaseWebhook):
|
|||||||
Whether to use the bot token over the webhook token
|
Whether to use the bot token over the webhook token
|
||||||
if available. Defaults to ``True``.
|
if available. Defaults to ``True``.
|
||||||
|
|
||||||
|
.. versionadded:: 2.0
|
||||||
|
|
||||||
Raises
|
Raises
|
||||||
-------
|
-------
|
||||||
HTTPException
|
HTTPException
|
||||||
@ -1098,6 +1121,8 @@ class Webhook(BaseWebhook):
|
|||||||
A :term:`py:bytes-like object` representing the webhook's new default avatar.
|
A :term:`py:bytes-like object` representing the webhook's new default avatar.
|
||||||
channel: Optional[:class:`abc.Snowflake`]
|
channel: Optional[:class:`abc.Snowflake`]
|
||||||
The webhook's new channel. This requires an authenticated webhook.
|
The webhook's new channel. This requires an authenticated webhook.
|
||||||
|
|
||||||
|
.. versionadded:: 2.0
|
||||||
reason: Optional[:class:`str`]
|
reason: Optional[:class:`str`]
|
||||||
The reason for editing this webhook. Shows up on the audit log.
|
The reason for editing this webhook. Shows up on the audit log.
|
||||||
|
|
||||||
@ -1106,6 +1131,8 @@ class Webhook(BaseWebhook):
|
|||||||
Whether to use the bot token over the webhook token
|
Whether to use the bot token over the webhook token
|
||||||
if available. Defaults to ``True``.
|
if available. Defaults to ``True``.
|
||||||
|
|
||||||
|
.. versionadded:: 2.0
|
||||||
|
|
||||||
Raises
|
Raises
|
||||||
-------
|
-------
|
||||||
HTTPException
|
HTTPException
|
||||||
@ -1244,6 +1271,8 @@ class Webhook(BaseWebhook):
|
|||||||
This is only available to :attr:`WebhookType.application` webhooks.
|
This is only available to :attr:`WebhookType.application` webhooks.
|
||||||
If a view is sent with an ephemeral message and it has no timeout set
|
If a view is sent with an ephemeral message and it has no timeout set
|
||||||
then the timeout is set to 15 minutes.
|
then the timeout is set to 15 minutes.
|
||||||
|
|
||||||
|
.. versionadded:: 2.0
|
||||||
file: :class:`File`
|
file: :class:`File`
|
||||||
The file to upload. This cannot be mixed with ``files`` parameter.
|
The file to upload. This cannot be mixed with ``files`` parameter.
|
||||||
files: List[:class:`File`]
|
files: List[:class:`File`]
|
||||||
@ -1429,9 +1458,13 @@ class Webhook(BaseWebhook):
|
|||||||
This should not be mixed with the ``embeds`` parameter.
|
This should not be mixed with the ``embeds`` parameter.
|
||||||
file: :class:`File`
|
file: :class:`File`
|
||||||
The file to upload. This cannot be mixed with ``files`` parameter.
|
The file to upload. This cannot be mixed with ``files`` parameter.
|
||||||
|
|
||||||
|
.. versionadded:: 2.0
|
||||||
files: List[:class:`File`]
|
files: List[:class:`File`]
|
||||||
A list of files to send with the content. This cannot be mixed with the
|
A list of files to send with the content. This cannot be mixed with the
|
||||||
``file`` parameter.
|
``file`` parameter.
|
||||||
|
|
||||||
|
.. versionadded:: 2.0
|
||||||
allowed_mentions: :class:`AllowedMentions`
|
allowed_mentions: :class:`AllowedMentions`
|
||||||
Controls the mentions being processed in this message.
|
Controls the mentions being processed in this message.
|
||||||
See :meth:`.abc.Messageable.send` for more information.
|
See :meth:`.abc.Messageable.send` for more information.
|
||||||
@ -1440,6 +1473,8 @@ class Webhook(BaseWebhook):
|
|||||||
the view is removed. The webhook must have state attached, similar to
|
the view is removed. The webhook must have state attached, similar to
|
||||||
:meth:`send`.
|
:meth:`send`.
|
||||||
|
|
||||||
|
.. versionadded:: 2.0
|
||||||
|
|
||||||
Raises
|
Raises
|
||||||
-------
|
-------
|
||||||
HTTPException
|
HTTPException
|
||||||
|
Loading…
x
Reference in New Issue
Block a user