From a2d1910be4d303d8784816b62fb463df7a30b0da Mon Sep 17 00:00:00 2001 From: ProfessorDey Date: Wed, 28 Feb 2018 23:50:24 +0000 Subject: [PATCH] Sanitise User Check This is something we apparently have always been missing because that was from the old code, iirc. --- bot/modules/tipbot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/modules/tipbot.js b/bot/modules/tipbot.js index a19acec..033892f 100644 --- a/bot/modules/tipbot.js +++ b/bot/modules/tipbot.js @@ -220,7 +220,7 @@ function doTip(message, tipper, words, helpmsg) { return message.reply("I don't know how to tip that many credits...").then(message => message.delete(5000)); } - if (message.mentions.users.first().id) { + if (message.mentions.users.first() && message.mentions.users.first().id) { return sendLBC(message, tipper, message.mentions.users.first().id.replace('!', ''), amount, prv); } message.reply('Sorry, I could not find a user in your tip...');