slack-command-handler.js 640 B

12345678910111213141516171819202122232425
  1. // Any slack command handler should inherit BaseSlackCommandHandler
  2. class BaseSlackCommandHandler {
  3. constructor(crowi) {
  4. this.crowi = crowi;
  5. }
  6. /**
  7. * Handle /commands endpoint
  8. */
  9. handleCommand(client, body, ...opt) { throw new Error('Implement this') }
  10. /**
  11. * Handle /interactions endpoint 'block_actions'
  12. */
  13. handleBlockActions(client, payload, handlerMethodName) { throw new Error('Implement this') }
  14. /**
  15. * Handle /interactions endpoint 'view_submission'
  16. */
  17. handleViewSubmission(client, payload, handlerMethodName) { throw new Error('Implement this') }
  18. }
  19. module.exports = BaseSlackCommandHandler;