Finished the welcome message command

This commit is contained in:
ION606
2022-06-10 21:19:14 +03:00
parent d881aaf14b
commit 5bdb93be68
2 changed files with 16 additions and 8 deletions
+7 -3
View File
@@ -54,10 +54,14 @@ async function welcome(member, welcomechannel, welcomemessage = null, welcomeban
//message.author.username == interaction.member.displayName
//message.guild.name == interaction.member.guild.name
let txt = 'Welcome to';
if (welcomemessage != null) { txt = welcomemessage}
let text = `Welcome to ${member.guild.name} ${member.user.username}#${member.user.discriminator}!`;
if(welcomemessage != null) {
text = welcomemessage;
text = text.replace('{sn}', member.guild.name);
text = text.replace('{un}', member.user.username);
text = text.replace('{ut}', member.user.discriminator);
}
const text = `${txt} ${member.guild.name} ${member.user.username}#${member.user.discriminator}!`;
context.font = applyText(canvas, text);
context.fillStyle = '#ffffff';
context.fillText(text, (canvas.width/2) - (text.length * 7.5), canvas.height - 15);