Merge pull request #25 from ProfessorDey/patch-5

Quick fix for private tip message tagging
This commit is contained in:
filipnyquist 2018-04-10 19:43:06 +02:00 committed by GitHub
commit 7e9134e4cc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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`; DM me with \`${message.content.split(' ', 1)[0]}\` for command specific instructions or with \`!tips\` for all available commands`;
if (privacyFlag) { if (privacyFlag) {
let usr = message.guild.members.find('id', recipient).user; 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}`; ${tx}${msgtail}`;
message.author.send(authmsg); message.author.send(authmsg);
if (message.author.id !== message.mentions.users.first().id) { 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}`; ${tx}${msgtail}`;
usr.send(recipientmsg); usr.send(recipientmsg);
} }