mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-25 22:55:00 +05:00
32 lines
737 B
JavaScript
32 lines
737 B
JavaScript
const { EmbedBuilder } = require("discord.js"),
|
||
BaseEvent = require("../../base/BaseEvent");
|
||
|
||
class GuildDelete extends BaseEvent {
|
||
constructor() {
|
||
super({
|
||
name: "guildDelete",
|
||
once: false,
|
||
});
|
||
}
|
||
|
||
/**
|
||
*
|
||
* @param {import("../../base/Client")} client
|
||
* @param {import("discord.js").Guild} guild
|
||
*/
|
||
async execute(client, guild) {
|
||
const embed = new EmbedBuilder()
|
||
.setAuthor({
|
||
name: guild.name,
|
||
iconURL: guild.iconURL(),
|
||
})
|
||
.setColor(client.config.embed.color)
|
||
.setFooter(client.config.embed.footer)
|
||
.setDescription(`Вышел с сервера **${guild.name}**.`);
|
||
client.channels.cache.get(client.config.support.logs).send({
|
||
embeds: [embed],
|
||
});
|
||
}
|
||
}
|
||
|
||
module.exports = GuildDelete;
|