Skip to main content

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.

Metadata

Release files for dpymenus 2.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dpymenus 2.1.5
File Size Uploaded
dpymenus-2.1.5.tar.gz 20.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dpymenus 2.1.5
File Interpreter ABI Platform
dpymenus-2.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 44.9 kB

Release files / dpymenus-2.1.5.tar.gz

Download URL dpymenus-2.1.5.tar.gz
Size 20.3 kB
Tags Source
SHA-256 checksum
How to use checksums
d0fe8f8555a41bfbfdcbf33102dd5688006267336a7c97313c6829385ec92fdd
BLAKE2b-256 checksum
How to use checksums
2576c7d11ccb8b4119af17594eef0d5865d66d694df35662fb684c605b3e4036
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.6 CPython/3.9.5 Linux/5.11.0-7614-generic

Release files / dpymenus-2.1.5-py3-none-any.whl

Download URL dpymenus-2.1.5-py3-none-any.whl
Size 24.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4ed82e93eeaa55130ea26cd6dbcb99c1d034ffe7ce2a14e6d4497731da6df26e
BLAKE2b-256 checksum
How to use checksums
3250faeb5b9892c13bde4c954ca45b3163d88eb806d04622e246ca6bfb8d3071
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.6 CPython/3.9.5 Linux/5.11.0-7614-generic

Release history Release notifications | RSS feed

This release

2.1.5 This release

2 release files

2.1.4

2 release files

2.1.3

2 release files

2.1.2

2 release files

2.1.1

2 release files

2.1.0

2 release files

2.0.0

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.3

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.1.0

2 release files

1.0.4

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.10

2 release files

0.2.9

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page