Skip to content

PyDrocsid.pagination

create_pagination async

create_pagination(channel: Message | Messageable | InteractionResponse, user: User | Member | None, embeds: list[Embed], **kwargs: Any) -> Message

Create embed pagination on a message.

Parameters:

Source code in PyDrocsid/pagination.py
84
85
86
87
88
89
90
91
92
93
94
95
96
async def create_pagination(
    channel: Message | Messageable | InteractionResponse, user: User | Member | None, embeds: list[Embed], **kwargs: Any
) -> Message:
    """
    Create embed pagination on a message.

    :param channel: the channel to send the message to
    :param user: the user who should be able to control the pagination
    :param embeds: a list of embeds
    """

    paginator = Paginator(embeds, timeout=PAGINATION_TTL, user=user)
    return await paginator.reply(channel, **kwargs)