Merge pull request #18 from ProfessorDey/patch-2

Sanitise User Check
This commit is contained in:
Niko 2018-03-01 02:10:59 +01:00 committed by GitHub
commit 22af3edc89
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));
}
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...');