Last active
April 17, 2016 23:19
-
-
Save JonathanZWhite/87440949a0a37ab77989113d3be4778e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Messenger { | |
... | |
handleText(msg) { | |
const message = new Message(Message.mapMessage(msg)) | |
const text = message.text | |
if (inputParser.isAskingForGenreList(text)) | |
return handlers.music.getGenreList(message, this.bot) | |
if (inputParser.isAskingForNumberOfRec(text, store.getState(message.from).command)) | |
return handlers.music.getNumOfRec(message, this.bot) | |
if (inputParser.isAskingForRecommendation(text, store.getState(message.from).command)) | |
return handlers.music.getRecommendation(message, this.bot) | |
// default | |
return handlers.casual.getHelp(message, this.bot) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment