Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dpymenus

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dpymenus

Simplified menus for discord.py developers.

  • 2.1.5
  • PyPI
  • Socket score

Maintainers
1

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.

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc