Skip to content

FusionSid/Pycord-Paginator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pycord-Paginator

This is a paginator for pycord. It takes a list of embeds and makes them paginated with buttons

Example

Usage

from paginator import Paginator

async def func_name(ctx):
    embed1 = discord.Embed(title="Click the arrows", description="To look through the embeds")
    embed2 = discord.Embed(title="Test", description="Lol")
    embed3 = discord.Embed(title="Test", description="Lol")

    ems = [embed1, embed2, embed3]

    view = Paginator(ctx=ctx, ems=ems)

    message = await ctx.send(embed=em, view=view)

    # This part is optional but it makes it so that once the button timeouts it will be disabled so you wont get any INTERACTION FAILED errors.
    res = await view.wait()
    if res:
        for i in view.children:
            i.disabled = True
    return await message.edit(view=view)

Releases

No releases published

Packages

No packages published

Languages