curious.ext.paginator

A reactions-based paginator.

Classes

ReactionsPaginator(content, …) A paginator for a message using reactions.
class curious.ext.paginator.ReactionsPaginator(content: typing.Union[str, typing.List[str], typing.List[curious.dataclasses.embed.Embed]], channel: curious.dataclasses.channel.Channel, respond_to: typing.Union[curious.dataclasses.member.Member, curious.dataclasses.user.User], *, break_at: int = 2000, title: str = None)[source]

Bases: object

A paginator for a message using reactions.

Parameters:
  • content (Union[str, List[str], List[Embed]]) – The content to page through.
  • channel (Channel) – The channel to send the content to.
  • respond_to (Union[Member, User]) – The member to respond
  • break_at (int) – The number of characters to break the message up into.
  • title (Optional[str]) – The title to put above the embed.
page = None

The current page this paginator is on.

_message = None

The message object that is being edited.

classmethod await paginate_response(responding_to, *args, **kwargs)[source]

Paginates a response to a message.

Parameters:
  • content (str) – The content to paginate.
  • responding_to (Message) – The message object that you are responding to.
Return type:

ReactionsPaginator

await send_current_page()[source]

Sends the current page to the channel.

Return type:None
await _add_initial_reactions()[source]

Adds the initial reactions to this message.

await paginate()[source]

Starts paginating this message.

This will continuously listen for reactions on this message until the STOP button is pressed.