Skip to main content

A pretty embeded version of the default help command.

Project description

discord-ext-prettyhelp

An embed version of the built in help command for discord.py

Inspired by the DefaultHelpCommand that discord.py uses, but revised for embeds and additional sorting on individual pages that can be "scrolled" through with reactions.

Installation

pip install discord-ext-prettyhelp

Usage

Example of how to use it:

from discord.ext import commands
from discord.ext.prettyhelp import PrettyHelp

bot = commands.Bot(
    command_prefix="!", help_command=PrettyHelp()
)

Added Optional Args

  • color - Set the default embed color
  • ending_note - Set the footer of the embed. Ending notes are fed a commands.Context (ctx) and a PrettyHelp (help) instance for more advanced customization.
  • index_title - Set the index page name default is "Categories"
  • menu - set a custom menu for navigating pages. Uses a pretty_help.PrettyMenu() instance. Default is pretty_help.DefaultMenu()
  • no_category - Set the name of the page with commands not part of a category. Default is "No Category"
  • sort_commands - Sort commands and categories alphabetically
  • show_index - Show the index page or not

pretty_help.DefaultHelp args

  • active_time - Set the time (in seconds) that the message will be active. Default is 30s
  • page_left - The emoji to use to page left
  • page_right - The emoji to use to page right
  • remove - The emoji to use to remove the help message

By default, the help will just pick a random color on every invoke. You can change this using the color argument:

from discord.ext import commands
from discord.ext.prettyhelp import DefaultMenu, PrettyHelp

# ":discord:743511195197374563" is a custom discord emoji format. Adjust to match your own custom emoji.
menu = DefaultMenu(
    page_left="\U0001F44D",
    page_right="👎",
    remove=":discord:743511195197374563",
    active_time=5,
)

# Custom ending note
ending_note = (
    "The ending note from {ctx.bot.user.name}"
    "\nFor command {help.clean_prefix}{help.invoked_with}"
)

bot = commands.Bot(command_prefix="!")

bot.help_command = PrettyHelp(
    menu=menu, ending_note=ending_note
)

The basic help command will break commands up by cogs. Each cog will be a different page. Those pages can be navigated with the arrow embeds. The message is unresponsive after 30s of no activity, it'll remove the reactions to let you know.

example

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

discord-ext-prettyhelp-0.2.2.tar.gz (9.8 kB view details)

Uploaded Source

Built Distribution

discord_ext_prettyhelp-0.2.2-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

Details for the file discord-ext-prettyhelp-0.2.2.tar.gz.

File metadata

  • Download URL: discord-ext-prettyhelp-0.2.2.tar.gz
  • Upload date:
  • Size: 9.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.0

File hashes

Hashes for discord-ext-prettyhelp-0.2.2.tar.gz
Algorithm Hash digest
SHA256 947c7b56053a5b61457831ab39b8334706b695ffe5b00dde60c3911afa498dcc
MD5 6ab77d1e23a7d6fa3fcf8256422e66d6
BLAKE2b-256 541f51faecd0bb8eee38a3d7d481a211387d4bd4f23ebbb3ba5c6718ada324f9

See more details on using hashes here.

Provenance

File details

Details for the file discord_ext_prettyhelp-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: discord_ext_prettyhelp-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 10.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.0

File hashes

Hashes for discord_ext_prettyhelp-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 cc124406362da1692604606b6a7149694ad0e8b4e2ae93502459deae1d5e682b
MD5 6a28dac34ed16b78d2de3c6d1de895d5
BLAKE2b-256 1da9faeae54f4a996fe1a6209884ac162cb87aa45b855114d1b9d1a7591dc05a

See more details on using hashes here.

Provenance

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