za419 / CadenceBot

A Discord bot for Cadence Radio
MIT License
2 stars 1 forks source link

New help topic: Dynamic list of all help topics #61

Open za419 opened 3 years ago

za419 commented 3 years ago

This task covers the creation of a meta-help topic - A special-cased topic which will simply produce a list of all help topics CadenceBot can respond to.

This requires the implementation of a special-casing mechanism (which will probably be shared with #60). My current thought for this in config is something like:

"helpTopics": {
    "topics": {
        "specialCase": "listTopics"
    }
}

Upon recognition of this special case, we should dynamically assemble a list of all available help topics (ie Object.keys(config.helpTopics), and format them into a helptext, which should be something like:

Help Topics in CadenceBot

CadenceBot supports the following help topics:

  1. help
  2. bans ...

To see more information on a topic, see Cadence help <topic>.

The list can be numbered or unordered, as is preferred. If you can think of a good subtitle, that would be a welcome addition as well.