18 lines
637 B
JavaScript
18 lines
637 B
JavaScript
|
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;
|
||
|
channel.forEach(element => {
|
||
|
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);
|
||
|
},
|
||
|
};
|