Explorar el Código

modify splitted slash-command-parser

zahmis hace 5 años
padre
commit
6255ee2e23
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      packages/slack/src/utils/slash-command-parser.ts

+ 2 - 1
packages/slack/src/utils/slash-command-parser.ts

@@ -5,7 +5,8 @@ import { InvalidGrowiCommandError } from '../models/errors';
 
 export const parse = (slashCommand: SlashCommand): GrowiCommand => {
   console.log(slashCommand);
-  const splitted = slashCommand.command.split(' ');
+  const splitted = slashCommand.text.split(' ');
+  console.log('splited', splitted);
   if (splitted.length < 1) {
     throw new InvalidGrowiCommandError('The SlashCommand.text does not specify GrowiCommand type');
   }