Merge pull request #19 from ProfessorDey/patch-3

Fix Private Mode Usernames
This commit is contained in:
Niko 2018-03-08 11:15:22 +01:00 committed by GitHub
commit 44f4b4407f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -315,12 +315,12 @@ function sendLBC(message, tipper, recipient, amount, privacyFlag) {
let msgtail = `
DM me with \`${message.content.split(' ', 1)[0]}\` for command specific instructions or with \`!tips\` for all available commands`;
if (privacyFlag) {
let authmsg = `You have just privately tipped <@${recipient}> ${amount} LBC.
let usr = message.guild.members.find('id', recipient).user;
let authmsg = `You have just privately tipped @${usr.username}#${usr.tag} ${amount} LBC.
${tx}${msgtail}`;
message.author.send(authmsg);
if (message.author.id !== message.mentions.users.first().id) {
let usr = message.guild.members.find('id', recipient).user;
let recipientmsg = `You have just been privately tipped ${amount} LBC by <@${tipper}>.
let recipientmsg = `You have just been privately tipped ${amount} LBC by @${message.author.username}#${message.author.tag}.
${tx}${msgtail}`;
usr.send(recipientmsg);
}