-
Notifications
You must be signed in to change notification settings - Fork 0
Help
Help information is defined in the help.yml resource which is included in the JAR file. Help topics must be listed under "Topics" in key:value format, where the key is the case-sensitive name of the topic, and the value is the message to be provided.
Modbot does not enforce any other rules for help topics, but there are a few additional conventions.
- The name of the topic is usually the name of a command or module (excluding the leading exclamation point
!if applicable). - The first line of the help message for a command is expected to consist of the syntax for the command.
- Currently, alternative command aliases have their own help topics. Help information is expected to be consistent across all aliases of a command.
Topics:
Help: | #Capitalized "Help" is the name of the Help module, distinct from the lowercase "help"
Provides help information on commands and modules.
Commands: `!help`
Manager: |
Manages all modules and provides other functions to the bot owner.
Commands:
• `$stop`
• `$disable`
• `$enable`
• `!modules`
help: | #Lowercase "help" is the name of the "!help" command, distinct from the capitalized "Help"
Syntax: `!help [topic]`
Displays help information about commands this bot responds to.
$stop: | #This command does not start with "!", so it is written as-is.
Syntax: `$stop`
Stops this bot.
$disable: |
Syntax: `$disable <module>`
Disables a module.
$enable: |
Syntax: `$enable <module>`
Enables a module.
modules: |
Syntax: `!modules`
Lists module names.The help topics are loaded into memory by the HelpListener class, even if the Help module itself is not enabled. This allows other parts of Modbot to get help information as needed.
As of now, the Help module only has one command: !help. If run without arguments, it will list all commands the user has permission to run. If run with an argument, it will provide help information for the given query, if available. The query is case-sensitive. Currently, this requires the Help module to be enabled.
!help => Lists all commands this user can run.
!help Manager => Provides information on the Manager module.
!help Help => Provides information on the Help module, NOT the !help command.
!help $stop => Provides information on the $stop command.
!help modules => Provides information on the !modules command.
!help !modules => Also provides information on the !modules command.
Running a command with "help" (case-sensitive) as its only argument will also provide help information for that command; the command will not run normally. Currently, this requires the command's respective CommandListener module to be enabled.
!modules help => Provides information on the !modules command.
!help help => Provides information on the !help command.
$enable help => Provides information on the $enable command. This will NOT enable the Help module.
$enable Help => Enables the Help module.
Additionally, a command may encounter a syntax error, in which case it may run CommandEvent#syntaxError. By default, this displays the first line of the command's help message, which is conventionally expected to be the syntax for that command, as explained earlier.