RecieveService.ts 481 B

1234567891011121314151617
  1. import { Service } from '@tsed/di';
  2. import { SlashCommand } from '@slack/bolt';
  3. import { parse } from '@growi/slack/src/utils/slash-command-parser';
  4. @Service()
  5. export class ReceiveService {
  6. receiveContentsFromSlack(body:SlashCommand) : string {
  7. const parseBody = parse(body);
  8. if (parseBody.growiCommandType === 'register') {
  9. console.log('register action occured');
  10. return 'register action occurd';
  11. }
  12. return 'return receiveContentsFromSlack';
  13. }
  14. }