JaBa/events/Guild/guildDelete.js

33 lines
737 B
JavaScript
Raw Normal View History

const { EmbedBuilder } = require("discord.js"),
BaseEvent = require("../../base/BaseEvent");
2022-01-04 02:18:28 +05:00
class GuildDelete extends BaseEvent {
constructor() {
super({
name: "guildDelete",
once: false,
});
2022-01-04 02:18:28 +05:00
}
/**
*
2023-11-05 16:03:23 +05:00
* @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(),
})
2023-07-03 19:30:47 +05:00
.setColor(client.config.embed.color)
.setFooter(client.config.embed.footer)
.setDescription(`Вышел с сервера **${guild.name}**.`);
client.channels.cache.get(client.config.support.logs).send({
embeds: [embed],
2022-01-16 20:59:08 +05:00
});
2022-01-04 02:18:28 +05:00
}
}
2023-07-05 00:58:06 +05:00
module.exports = GuildDelete;