memes
This commit is contained in:
parent
bc45256b7f
commit
7db432a293
@ -36,6 +36,7 @@ bot.dialog('/', new builder.IntentDialog()
|
|||||||
.matches(helper.regex("about"), function(s) {cmd.about(s)})
|
.matches(helper.regex("about"), function(s) {cmd.about(s)})
|
||||||
.matches(helper.regex("help"), function(s) {cmd.help(s)})
|
.matches(helper.regex("help"), function(s) {cmd.help(s)})
|
||||||
.matches(helper.regex("meme \\w+"), function(s) {cmd.meme(s)})
|
.matches(helper.regex("meme \\w+"), function(s) {cmd.meme(s)})
|
||||||
|
.matches(helper.regex("memes"), function(s) {cmd.memes(s)})
|
||||||
.onDefault(function(session) {
|
.onDefault(function(session) {
|
||||||
session.send("I didn't understand. Say 'help' to get a list of commands!");
|
session.send("I didn't understand. Say 'help' to get a list of commands!");
|
||||||
}));
|
}));
|
||||||
|
@ -43,7 +43,9 @@ text.help = [
|
|||||||
"about - Gives you information about the bot",
|
"about - Gives you information about the bot",
|
||||||
"ping - pong!",
|
"ping - pong!",
|
||||||
"stuff - Information about different services we use",
|
"stuff - Information about different services we use",
|
||||||
"games - IPs and other related information about game servers we use"
|
"games - IPs and other related information about game servers we use",
|
||||||
|
"meme - meme <meme.png> posts the relevant meme",
|
||||||
|
"memes - lists all available memes"
|
||||||
];
|
];
|
||||||
|
|
||||||
exports.help = function(session) {
|
exports.help = function(session) {
|
||||||
@ -71,3 +73,8 @@ exports.meme = function(session) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
exports.memes = function(session) {
|
||||||
|
var memes = fs.readdirSync("/usr/src/app/memes/");
|
||||||
|
helper.send(session, ["My available memes are:", memes.join(", ")]);
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user