2021-11-09 09:34:55 +01:00
|
|
|
const { WelcomeChannel } = require("discord.js");
|
|
|
|
const { userMention } = require("@discordjs/builders");
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
name: 'guildMemberAdd',
|
|
|
|
async execute(member, guild) {
|
|
|
|
|
|
|
|
await guild.fetchWelcomeScreen()
|
|
|
|
.then(() => {
|
|
|
|
const channel = this.welcomeChannels;
|
2021-11-09 17:33:18 +01:00
|
|
|
channel.forEach(async element => {
|
2021-11-09 09:34:55 +01:00
|
|
|
const nickname = memberNicknameMention(member.id);
|
|
|
|
await interaction.reply('Bienvenue ' + nickname + ' ! Mets toi à l\'aise, il y a des bières dans le frigo.');
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.catch(console.error);
|
|
|
|
},
|
|
|
|
};
|