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",
|
|
|
|
|
once: false
|
|
|
|
|
});
|
2022-01-04 02:18:28 +05:00
|
|
|
|
}
|
2022-07-23 17:14:42 +05:00
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* @param {import("discord.js").Guild} guild
|
|
|
|
|
*/
|
|
|
|
|
async execute(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-07-31 17:08:00 +05:00
|
|
|
|
iconURL: guild.iconURL()
|
2022-01-11 02:18:39 +05:00
|
|
|
|
})
|
2022-01-04 02:18:28 +05:00
|
|
|
|
.setColor("#B22222")
|
2022-07-23 17:14:42 +05:00
|
|
|
|
.setDescription(`Вышел с сервера **${guild.name}**.`);
|
2022-01-16 20:59:08 +05:00
|
|
|
|
this.client.channels.cache.get(this.client.config.support.logs).send({
|
|
|
|
|
embeds: [embed]
|
|
|
|
|
});
|
2022-01-04 02:18:28 +05:00
|
|
|
|
}
|
2022-07-23 17:14:42 +05:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
module.exports = GuildDelete;
|