Repository navigation
v1.2.0
Adds /help, which the bot was being asked for but did not have.
Running /help previously produced CommandNotFound: Application command 'help' not found in the log and nothing in the channel. No /help has ever existed in this repository, and every version of bot.py has only performed a plain global tree.sync() — so that registration came from outside the codebase. Implementing the command is the more useful of the two fixes.
How it works
The listing is generated by walking the live command tree when the command runs, grouped by cog. Nothing is hardcoded, so:
- A new cog's commands appear without any edit to
help.py. - A cog skipped at startup for missing configuration contributes no commands and simply does not appear.
/helptherefore doubles as an honest per-server statement of what is actually set up, rather than a wish list.
SECTIONS maps cog class names to readable headings. Anything unmapped falls back to the class name, so a future cog shows up badly labelled rather than invisible.
Output is ephemeral, so it does not clutter the channel.
Tests
51, up from 48. The new ones assert that every command in the tree reaches a section, that no heading leaks a raw class name, and that the embed stays inside Discord's per-field and total size limits.
ghcr.io/thenotoriousjeremy/danbot:1.2.0