Skip to main content

Simplified menus for discord.py developers.

Project description

Discord Menus

Simplified menus for discord.py developers.

Version Docs Python Version


user creates an embed, reaction buttons are added, and user navigates the
menu by clicking the buttons

Table of Contents

The Book
API Docs
Examples





Features

dpymenus is an unofficial add-on for the discord.py library that lets you quickly compose various styles of menus which react to user input.

  • Handles text & button input, normalization, and validation
  • Easy-to-build menus with paginated data, multiple choices, and polls
  • Template system for quickly defining a cohesive style for your menus
  • User-defined callbacks & event hooks for complex use-cases
  • Awesome examples and documentation to get rolling quickly

Quick Start

pip install dpymenus

Read "Installation" from The Book for further information.

Examples

from discord.ext import commands
from dpymenus import Page, PaginatedMenu


class Demo(commands.Cog):
    def __init__(self, client):
        self.client = client

    @commands.command()
    async def demo(self, ctx: commands.Context):
        page1 = Page(title='Page 1', description='First page test!')
        page1.add_field(name='Example A', value='Example B')

        page2 = Page(title='Page 2', description='Second page test!')
        page2.add_field(name='Example C', value='Example D')

        page3 = Page(title='Page 3', description='Third page test!')
        page3.add_field(name='Example E', value='Example F')

        menu = PaginatedMenu(ctx)
        menu.add_pages([page1, page2, page3])
        await menu.open()


def setup(client):
    client.add_cog(Demo(client))

The examples directory contains working examples for almost every feature of the library.

In addition, the chapter on "Examples" walks you through setting up the built-in example runner.

Support

If you are looking for support on how to use particular library functions, please ask in the discussions tab.

If you've encountered a bug, submit an issue.

In addition, feel free to add me on Discord @ Rob (롭)#0013 -- I am open to discuss the library and assist when I am free, but I prefer you use the GitHub options as it may help other people as well.

Contributing

dpymenus is open-source for a reason -- I welcome all additions, bug fixes, and changes if they fit within the scope of the library. Please see the chapter on "Contributing" in the book for detailed information. Don't be shy!


Have you found this library useful? Please leave a ⭐ on the project -- it means a lot to me!

Check out my other discord.py utility: cogwatch -- Automatic hot-reloading for your discord.py command files.

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

dpymenus-2.1.5.tar.gz (20.3 kB view details)

Uploaded Source

Built Distribution

dpymenus-2.1.5-py3-none-any.whl (24.6 kB view details)

Uploaded Python 3

File details

Details for the file dpymenus-2.1.5.tar.gz.

File metadata

  • Download URL: dpymenus-2.1.5.tar.gz
  • Upload date:
  • Size: 20.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.6 CPython/3.9.5 Linux/5.11.0-7614-generic

File hashes

Hashes for dpymenus-2.1.5.tar.gz
Algorithm Hash digest
SHA256 d0fe8f8555a41bfbfdcbf33102dd5688006267336a7c97313c6829385ec92fdd
MD5 c17a47999cea97ad7c2f7be252f2bdee
BLAKE2b-256 2576c7d11ccb8b4119af17594eef0d5865d66d694df35662fb684c605b3e4036

See more details on using hashes here.

File details

Details for the file dpymenus-2.1.5-py3-none-any.whl.

File metadata

  • Download URL: dpymenus-2.1.5-py3-none-any.whl
  • Upload date:
  • Size: 24.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.6 CPython/3.9.5 Linux/5.11.0-7614-generic

File hashes

Hashes for dpymenus-2.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 4ed82e93eeaa55130ea26cd6dbcb99c1d034ffe7ce2a14e6d4497731da6df26e
MD5 24392c4325b33d3296aafdd601a37d2a
BLAKE2b-256 3250faeb5b9892c13bde4c954ca45b3163d88eb806d04622e246ca6bfb8d3071

See more details on using hashes here.

Supported by

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