2022-07-31 17:08:00 +05:00
|
|
|
|
const { EmbedBuilder } = require("discord.js"),
|
2022-07-26 17:20:10 +05:00
|
|
|
|
BaseEvent = require("../../base/BaseEvent");
|
2022-01-04 02:18:28 +05:00
|
|
|
|
|
2022-07-23 17:14:42 +05:00
|
|
|
|
class GuildDelete extends BaseEvent {
|
|
|
|
|
constructor() {
|
|
|
|
|
super({
|
|
|
|
|
name: "guildDelete",
|
2022-12-15 21:02:38 +05:00
|
|
|
|
once: false,
|
2022-07-23 17:14:42 +05:00
|
|
|
|
});
|
2022-01-04 02:18:28 +05:00
|
|
|
|
}
|
2022-08-02 17:18:47 +05:00
|
|
|
|
|
2022-07-23 17:14:42 +05:00
|
|
|
|
/**
|
|
|
|
|
*
|
2022-08-02 17:18:47 +05:00
|
|
|
|
* @param {import("../../base/JaBa")} client
|
2022-07-23 17:14:42 +05:00
|
|
|
|
* @param {import("discord.js").Guild} guild
|
|
|
|
|
*/
|
2022-08-02 17:18:47 +05:00
|
|
|
|
async execute(client, guild) {
|
2022-07-31 17:08:00 +05:00
|
|
|
|
const embed = new EmbedBuilder()
|
2022-01-11 02:18:39 +05:00
|
|
|
|
.setAuthor({
|
|
|
|
|
name: guild.name,
|
2022-12-15 21:02:38 +05:00
|
|
|
|
iconURL: guild.iconURL(),
|
2022-01-11 02:18:39 +05:00
|
|
|
|
})
|
2023-07-03 19:30:47 +05:00
|
|
|
|
.setColor(client.config.embed.color)
|
|
|
|
|
.setFooter({ text: client.config.embed.footer })
|
2022-07-23 17:14:42 +05:00
|
|
|
|
.setDescription(`Вышел с сервера **${guild.name}**.`);
|
2022-08-02 17:18:47 +05:00
|
|
|
|
client.channels.cache.get(client.config.support.logs).send({
|
2022-12-15 21:02:38 +05:00
|
|
|
|
embeds: [embed],
|
2022-01-16 20:59:08 +05:00
|
|
|
|
});
|
2022-01-04 02:18:28 +05:00
|
|
|
|
}
|
2022-07-23 17:14:42 +05:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
module.exports = GuildDelete;
|