From 44d94e7a256841913bed1038cd95f5d214791c25 Mon Sep 17 00:00:00 2001 From: Niko Storni Date: Tue, 4 Dec 2018 20:38:48 -0500 Subject: [PATCH] fix private roletip --- 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 fcfdd58..1f96cf5 100644 --- a/bot/modules/tipbot.js +++ b/bot/modules/tipbot.js @@ -243,7 +243,7 @@ function doRoleTip(bot, message, tipper, words, helpmsg, MultiorRole) { if (roleToTip !== null) { let membersOfRole = roleToTip.members.keyArray(); if (membersOfRole.length > 0) { - let userIDs = membersOfRole.map(member => member.user.id.replace('!', '')); + let userIDs = membersOfRole.map(member => member.replace('!', '')); userIDs.forEach(u => { sendLBC(bot, message, tipper, u, amount, isPrivateTip, MultiorRole); }); @@ -291,7 +291,7 @@ DM me with \`!tips\` for all available commands or read our Tipbot FAQ https://l let authmsg = `You have sent a private tip to @${usr.tag} with the amount of ${amount} LBC. ${tx}${msgtail}`; message.author.send(authmsg); - if (message.author.id !== message.mentions.users.first().id) { + if (message.author.id !== usr.id) { let recipientmsg = `You have just been privately tipped ${amount} LBC by @${message.author.tag}. ${tx}${msgtail}`; usr.send(recipientmsg);