Apart from commands, adam also provides modules as a way of grouping commands. You might know command groups from other bot frameworks, however, modules are a bit more strict. Each module has its own name and every command in it can only be invoked if prefixed by its module's name.
Just as commands, a module is also abstracted through the plugin.Module
interface. Luckily, using a module is even easier than a command, and one can be created by calling module.New
.
Just like with command.Meta
, module.Meta
also offers some more fields. Refer to its documentation for more information.
Similarly tobot.Bot
, module.Module
also provides a AddCommand
and AddModule
method to add plugins.