Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

share help function between help [command] and [command] help #40

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

bendman
Copy link
Contributor

@bendman bendman commented Nov 4, 2020

⚠️ This hasn't been tested yet, because I don't know how to test bot branches in discord! ⚠️

This modifies the "complex" commands (those with a list of subcommands) to route the [command] help subcommand to a shared handler with help [command]. This way the help [command] handler will give detailed information using the embed created in the command.sendHelp function.

  1. Create helper abstractions for common functions (run, help, empty)
  2. Export a help function from commands using the new abstraction
  3. Adjust the central help command to handle functions
  4. Route the existing help subcommands to the new help function

This fixes #38

This is to prepare for unifying the way `help` is handled.
This modifies the "complex" commands (those with a list of subcommands) to route the `[command] help` subcommand to a shared handler with `help [command]`. This way the `help [command]` handler will give detailed information using the embed created in the command.sendHelp function.

1. Export a help function from commands
2. Adjust the central help command to handle functions
3. Route the existing help subcommands to the new help function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Some commands don't have a "+help [command]" handler
1 participant