Skip to content

Commit

Permalink
Adding delete_after for paginator.send (#1245)
Browse files Browse the repository at this point in the history
* Adding delete_after for paginator.send

* Update discord/ext/pages/pagination.py

Co-authored-by: Dorukyum <53639936+Dorukyum@users.noreply.github.com>

* Update discord/ext/pages/pagination.py

Co-authored-by: Dorukyum <53639936+Dorukyum@users.noreply.github.com>

* fix typehint on mention_author

Co-authored-by: Dorukyum <53639936+Dorukyum@users.noreply.github.com>
  • Loading branch information
jab416171 and Dorukyum authored Apr 11, 2022
1 parent b82092c commit b6edc3c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion discord/ext/pages/pagination.py
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,8 @@ async def send(
target_message: Optional[str] = None,
reference: Optional[Union[discord.Message, discord.MessageReference, discord.PartialMessage]] = None,
allowed_mentions: Optional[discord.AllowedMentions] = None,
mention_author: bool = None,
mention_author: Optional[bool] = None,
delete_after: Optional[float] = None,
) -> discord.Message:
"""Sends a message with the paginated items.
Expand All @@ -782,6 +783,8 @@ async def send(
are used instead.
mention_author: Optional[:class:`bool`]
If set, overrides the :attr:`~discord.AllowedMentions.replied_user` attribute of ``allowed_mentions``.
delete_after: Optional[:class:`float`]
If set, deletes the paginator after the specified time.
Returns
--------
Expand Down Expand Up @@ -831,6 +834,7 @@ async def send(
reference=reference,
allowed_mentions=allowed_mentions,
mention_author=mention_author,
delete_after=delete_after,
)

return self.message
Expand Down

0 comments on commit b6edc3c

Please sign in to comment.