Leave msg

main
kry008 2024-06-15 19:58:52 +02:00
parent d5515ff8c1
commit 712ecec2d3
1 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,19 @@
//guildMemberRemove
const { Events, EmbedBuilder } = require('discord.js');
module.exports = {
name: Events.GuildMemberRemove,
once: false,
execute(args) {
const { guild, user } = args;
const channel = guild.channels.cache.find(channel => ['goodbye', 'bye', 'left', 'leaving', 'wyjścia'].includes(channel.name));
if (!channel) return;
const embed = new EmbedBuilder()
.setTitle(`Goodbye ${user.username}!`)
.setDescription(`Goodbye ${user.username}!`)
.setColor('#ff0000')
.setThumbnail(user.avatarURL())
.setTimestamp();
channel.send({ embeds: [embed] });
}
};