Sanitise User Check

This is something we apparently have always been missing because that was from the old code, iirc.
This commit is contained in:
ProfessorDey 2018-02-28 23:50:24 +00:00 committed by GitHub
parent ea8773ffaf
commit a2d1910be4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)); 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); return sendLBC(message, tipper, message.mentions.users.first().id.replace('!', ''), amount, prv);
} }
message.reply('Sorry, I could not find a user in your tip...'); message.reply('Sorry, I could not find a user in your tip...');