zahmis 5 سال پیش
والد
کامیت
72b618403e
1فایلهای تغییر یافته به همراه6 افزوده شده و 1 حذف شده
  1. 6 1
      packages/slackbot-proxy/src/services/RecieveService.ts

+ 6 - 1
packages/slackbot-proxy/src/services/RecieveService.ts

@@ -1,11 +1,16 @@
+import { SlashCommand } from '@slack/bolt';
 import { Service } from '@tsed/di';
 import { Service } from '@tsed/di';
+import { parse } from '../../../slack/src/utils/slash-command-parser';
 import { openRegisterModal } from './RegisterService';
 import { openRegisterModal } from './RegisterService';
 
 
 
 
 @Service()
 @Service()
 export class ReceiveService {
 export class ReceiveService {
 
 
-  receiveContentsFromSlack(body:{[key:string]:string}) : string {
+  receiveContentsFromSlack(body:SlashCommand) : string {
+    console.log(body);
+    const parseBody = parse(body);
+    console.log(parseBody);
     if (body.text === 'register') {
     if (body.text === 'register') {
       openRegisterModal(body);
       openRegisterModal(body);