Skip to content

Commit

Permalink
Quick fix for private tip message tagging
Browse files Browse the repository at this point in the history
For some reason User.tag includes username#1234, not just 1234 as one would expect, so quick fix so these display properly. Nothing complicated.
  • Loading branch information
ProfessorDey authored Apr 10, 2018
1 parent 34b7b23 commit 9059d90
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bot/modules/tipbot.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 9059d90

Please sign in to comment.