Skip to content

Commit

Permalink
Create command interface
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Krivov authored and Alex Krivov committed Mar 2, 2017
1 parent b0179f7 commit f00151e
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions lib/command_interface.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
const startCommands = ['/start'];
const ideaCommands = ['/idea'];


module.exports = {
reactOnMessage: function reactOnMessage(bot, msg) {

//TODO - change bot name
const command = msg.text.replace(/@SkrivTest2bot$/, '');
let t = msg.text;


if (['/test'].includes(command)) {
console.log('InvisibleComand' + t);
}


if (['/skip'].includes(command)) {
console.log('VisibleComand' + t);
}

}
};

0 comments on commit f00151e

Please sign in to comment.