JaBa/events/Guild/guildDelete.js

31 lines
654 B
JavaScript
Raw Normal View History

const { MessageEmbed } = 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
}
/**
*
* @param {import("discord.js").Guild} guild
*/
async execute(guild) {
const embed = new MessageEmbed()
.setAuthor({
name: guild.name,
iconURL: guild.iconURL({
dynamic: true
})
})
2022-01-04 02:18:28 +05:00
.setColor("#B22222")
.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
}
}
module.exports = GuildDelete;