Skip to main content

A simple to use, interactive session and paginator with custom buttons for discord.py.

Project description

A simple to use, highly customizable, Interactive Session and Paginator for discord.py. Still in early stages and undergoing rapid production. Feel free to suggest something via Discord.

Support

For support using Buttons, please join the official support server on Discord.

Discord

Installation

Buttons requires Python 3.6 or higher.

Windows

py -version -m pip install buttons

Linux

python3 -m pip install buttons

Getting Started

A quick and easy paginator example:

from discord.ext import commands
from discord.ext import buttons


class MyPaginator(buttons.Paginator):

    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)

    @buttons.button(emoji='\u23FA')
    async def record_button(self, ctx, member):
        await ctx.send('This button sends a silly message! But could be programmed to do much more.')

    @buttons.button(emoji='my_custom_emoji:1234567890')
    async def silly_button(self, ctx, member):
        await ctx.send('Beep boop...')


bot = commands.Bot(command_prefix='??')


@bot.command()
async def test(ctx):
    pagey = MyPaginator(title='Silly Paginator', colour=0xc67862, embed=True, timeout=90, use_defaults=True,
                        entries=[1, 2, 3], length=1, format='**')

    await pagey.start(ctx)


@bot.event
async def on_ready():
    print('Ready!')


bot.run('TOKEN')

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for buttons, version 0.1.9
Filename, size File type Python version Upload date Hashes
Filename, size buttons-0.1.9-py3-none-any.whl (6.9 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size buttons-0.1.9.tar.gz (6.8 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page