fix clyde in webhook url

This commit is contained in:
Lamp 2020-03-08 22:49:31 -07:00 committed by GitHub
parent 8c887ab79f
commit 1240618d55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -2,10 +2,12 @@
(async function(){
var webhook = new Discord.WebhookClient(config.webhooks.welcome[0], config.webhooks.welcome[1]);
dClient.on('local_guildMemberAdd', async member => {
webhook.send(`${member} joined.`, {username: member.user.username, avatarURL: member.user.displayAvatarURL({format:'png',size:2048}), disableEveryone:true});
let username = member.user.username.toLowerCase().includes('clyde') ? member.user.username.replace(/C/g,'Q').replace(/c/g,'q') : member.user.username;
webhook.send(`${member} joined.`, {username, avatarURL: member.user.displayAvatarURL({format:'png',size:2048}), disableEveryone:true});
});
dClient.on('local_guildMemberRemove', async member => {
webhook.send(`${member.user.tag} left.`, {username: member.user.username, avatarURL: member.user.displayAvatarURL({format:'png',size:2048}), disableEveryone:true});
let username = member.user.username.toLowerCase().includes('clyde') ? member.user.username.replace(/C/g,'Q').replace(/c/g,'q') : member.user.username;
webhook.send(`${member.user.tag} left.`, {username, avatarURL: member.user.displayAvatarURL({format:'png',size:2048}), disableEveryone:true});
});
})();