changed to Pattern

This commit is contained in:
Villads Valur Korsholm Nielsen 2016-05-17 11:20:13 +00:00
parent f7c0e61528
commit 8764898bcf

View File

@ -28,14 +28,14 @@ function incrementKey(id, key, amount) {
});
}
controller.hears(["jonbot","^pattern$"],["direct_message","direct_mention","mention","ambient"],function(bot,message) {
console.log(message.user + " mentioned \"jonbot\"");
controller.hears(["pattern","^pattern$"],["direct_message","direct_mention","mention","ambient"],function(bot,message) {
console.log(message.user + " mentioned \"pattern\"");
// Increment the logged amount of mentions
incrementKey(message.user, "bot_mentions", 1);
// Reply properly
bot.reply(message,':clap: JOOOOON! :clap:');
bot.reply(message,':clap: PAAATTERN! :clap:');
bot.api.reactions.add({
timestamp: message.ts,
channel: message.channel,
@ -47,8 +47,8 @@ controller.hears(["jonbot","^pattern$"],["direct_message","direct_mention","ment
});
});
controller.hears(["jon","^pattern$"],["direct_message","direct_mention","mention","ambient"],function(bot,message) {
console.log(message.user + " mentioned \"jon\"");
controller.hears(["pattern","^pattern$"],["direct_message","direct_mention","mention","ambient"],function(bot,message) {
console.log(message.user + " mentioned \"pattern\"");
// Increment the logged amount of mentions
incrementKey(message.user, "jon_mentions", 1);