From 9059d90a175f7d533405b8f1a7aa7891e68a46f3 Mon Sep 17 00:00:00 2001 From: ProfessorDey Date: Tue, 10 Apr 2018 17:03:33 +0000 Subject: [PATCH] Quick fix for private tip message tagging For some reason User.tag includes username#1234, not just 1234 as one would expect, so quick fix so these display properly. Nothing complicated. --- 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 bdf8af8..38353d5 100644 --- a/bot/modules/tipbot.js +++ b/bot/modules/tipbot.js @@ -316,11 +316,11 @@ function sendLBC(message, tipper, recipient, amount, privacyFlag) { DM me with \`${message.content.split(' ', 1)[0]}\` for command specific instructions or with \`!tips\` for all available commands`; if (privacyFlag) { let usr = message.guild.members.find('id', recipient).user; - let authmsg = `You have just privately tipped @${usr.username}#${usr.tag} ${amount} LBC. + let authmsg = `You have just privately tipped @${usr.tag} ${amount} LBC. ${tx}${msgtail}`; message.author.send(authmsg); if (message.author.id !== message.mentions.users.first().id) { - let recipientmsg = `You have just been privately tipped ${amount} LBC by @${message.author.username}#${message.author.tag}. + let recipientmsg = `You have just been privately tipped ${amount} LBC by @${message.author.tag}. ${tx}${msgtail}`; usr.send(recipientmsg); }