.. discord-py-paginators documentation master file, created by
sphinx-quickstart on Tue Dec 26 17:07:44 2023.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to discord-py-paginators's documentation!
=================================================
Extension for discord.py that provides various paginators.
.. toctree::
:caption: API Reference
:maxdepth: 2
paginators
types
base
whats_new
Installation
=============
Stable
~~~~~~~
From `PyPI `_:
.. code-block:: bash
python -m pip install discord-py-paginators
Dev
~~~~
.. note::
This requires `git `_ to be installed on your system.
.. code-block:: bash
python -m pip install -U "discord-py-paginators @ git+https://github.com/Soheab/discord-py-paginators"
Usage
======
.. code-block:: python
import discord
from discord.ext import commands
from discord.ext.paginators import ButtonPaginator
bot = commands.Bot(command_prefix=commands.when_mentioned, intents=discord.Intents(guilds=True, messages=True))
@bot.command()
async def paginate(ctx):
list_with_many_items = list(range(100))
paginator = ButtonPaginator(list_with_many_items, author_id=ctx.author.id)
await paginator.send(ctx)
# Enjoy!
bot.run("token")
Examples
=========
Examples can be found on the `repository `_.
Links
======
- `Source code `_
- `Discord server `_
Contact
========
Send a DM on discord at ``Soheab_``, join the ``discord server`` or ping me in the `discord.py server `_.