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 alpha stages, and rapid production. Feel free to suggest something via Discord.

Support

For support using Buttons, please join the official support server on 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.

Source Distribution

buttons-0.1.8.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

buttons-0.1.8-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file buttons-0.1.8.tar.gz.

File metadata

  • Download URL: buttons-0.1.8.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

File hashes

Hashes for buttons-0.1.8.tar.gz
Algorithm Hash digest
SHA256 ebf7349ff0e6173ac26f3cfdb92b9fe0c01e73c5dbe5e2874950ed4e6e45bb98
MD5 4cdf7540cd67524663dbe6779d6cac06
BLAKE2b-256 3e4c087f7883629832c968936ded1501303b6796e101b6343b694108c2051c08

See more details on using hashes here.

File details

Details for the file buttons-0.1.8-py3-none-any.whl.

File metadata

  • Download URL: buttons-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

File hashes

Hashes for buttons-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 b58fe39c4995db9209443efb6799e22ae43a026d01989d84be033ce4d933cb96
MD5 58be0df78b29d825a783ebf5852aa8d9
BLAKE2b-256 a90166048ab1f139d99d1e037522fc46fb6ecc78a7f58237f11c7a8d17040008

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page