2
0
Эх сурвалжийг харах

Merge pull request #3395 from weseek/imprv/gw4934-echo-command

add echo command
Yuki Takei 5 жил өмнө
parent
commit
2087a37440

+ 8 - 0
src/server/service/bolt.js

@@ -66,6 +66,14 @@ class BoltService {
     this.bolt.command('/growi-bot', async({ command, ack, say }) => { // demo
       await say('Hello');
     });
+
+    // The echo command simply echoes on command
+    this.bolt.command('/echo', async({ command, ack, say }) => {
+      // Acknowledge command request
+      await ack();
+
+      await say(`${command.text}`);
+    });
   }
 
 }