Baphomet is the dedicated bot for nulloctet matrix
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
1.0 KiB

  1. /**
  2. * Example module
  3. * Copy this, replace the relevent parts, add it to the list in index.js
  4. */
  5. let { AbstractModule } = require('./abstract');
  6. class ExampleModule extends AbstractModule {
  7. constructor() {
  8. super(
  9. "Example",
  10. "Example tasks",
  11. "example"
  12. );
  13. this.helpAndUsage = `Usage: example <command>
  14. ...`;
  15. this.hidden = false; //default value
  16. this.needGlobalConfig = false; // default value
  17. this.needConfig = false; // default value
  18. this.defaultCommand = 'search'; // name of the command to call when no recognized command name is present
  19. }
  20. /* Commands
  21. * All methods starting with cmd_ will be parsed at initialization to expose those methods as commdands to the user
  22. */
  23. /**
  24. * Processed when !example blah is processed
  25. *
  26. * @param {...any} args the individual words passed after the command
  27. */
  28. cmd_blah(event, ...args) {
  29. return "Bla blah bla"
  30. }
  31. }
  32. exports.module = new ExampleModule();