mirror of https://github.com/kry008/Bot-2.0.git
Leave msg
parent
d5515ff8c1
commit
712ecec2d3
|
@ -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] });
|
||||||
|
}
|
||||||
|
};
|
Loading…
Reference in New Issue