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.

29 lines
756 B

  1. /**
  2. * Base module that all modules extend
  3. */
  4. let { logger } = require('../logging');
  5. let message = require('../message');
  6. class AbstractModule {
  7. name = "AbstractModule"
  8. description = "Base Module That All Other Modules Extend"
  9. command = "abstract_module"
  10. constructor(name, description, command) {
  11. this.name = name;
  12. this.description = description;
  13. this.command = command;
  14. }
  15. handleMessage(event, room) {
  16. logger.debug("[%s] [%s] [%s]", this.name, room.name, event.event.content.body);
  17. return message.createBasic(this.name + " processed the message");
  18. }
  19. help(event, room) {
  20. return message.createBasic(this.name + " HELP!");
  21. }
  22. }
  23. exports.AbstractModule = AbstractModule