A fork of discord-pretty-help, edited for Disnake support
An embed version of the built in help command for disnake. This will not work with discord.py and other forks/reworks.
The help command now is subclassed off the Disnake default HelpCommand ot resolve the TypeError associated with attempting to use the discord.py versions.
I will try to keep this updated along side stroupbslayen's main branch as they make changes to it.
Installation
I'll work to get this fork available with pip soon.pip install discord-pretty-help
Currently, the folder "pretty_help" should be placed in same directory as project entry/start file.
Usage
Example of how to use it:
from disnake.ext import commands
from pretty_help import PrettyHelp
bot = commands.Bot(command_prefix="!", help_command=PrettyHelp())
Added Optional Args
color
- Set the default embed colorending_note
- Set the footer of the embed. Ending notes are fed acommands.Context
(ctx
) and aPrettyHelp
(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 apretty_help.PrettyMenu()
instance. Default ispretty_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 alphabeticallyshow_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 30sdelete_after_timeout
- Delete the message afteractive_time
instead of removing reactions. DefaultFalse
page_left
- The emoji to use to page leftpage_right
- The emoji to use to page rightremove
- 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 pretty_help 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.
Changelog
[1.3.3]
- Added
delete_after_timeout
kwarg so messages are deleted after the time limit instead of just removing emojis - Added command cooldown information to pages
Notes:
- disnake.py must already be installed to use this
manage-messages
permission is recommended so reactions can be removed automatically