From 0c6162c184d055aadd432f29c9c240c1a013caa7 Mon Sep 17 00:00:00 2001 From: filipnyquist Date: Wed, 1 Nov 2017 20:19:00 +0100 Subject: [PATCH] Fixed problem with balances. Fixed the problem regarding MSFTservers balance and found a small problem which should be fixed by this quickfix, someone please review ASAP. --- bot/modules/tipbot.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bot/modules/tipbot.js b/bot/modules/tipbot.js index f5a18f9..912bc4e 100644 --- a/bot/modules/tipbot.js +++ b/bot/modules/tipbot.js @@ -104,8 +104,8 @@ function doTip(message, tipper, words) { return; } - if (words[1].match(/^<@[^>]+>$/)) { - let id = words[1].substr(2,words[1].length-3); + if (message.mentions.members.first().id) { + let id = message.mentions.members.first().id; sendLbc(message, tipper, id, amount); } else