JaBa/events/guildDelete.js

22 lines
653 B
JavaScript
Raw Normal View History

2022-01-04 02:18:28 +05:00
const Discord = require("discord.js");
module.exports = class {
constructor(client) {
this.client = client;
}
async run(guild) {
const embed = new Discord.MessageEmbed()
.setAuthor({
name: guild.name,
iconURL: guild.iconURL({
dynamic: true
})
})
2022-01-04 02:18:28 +05:00
.setColor("#B22222")
2022-01-16 20:59:08 +05:00
.setDescription(`Вышел с сервера **${guild.name}**. На нём **${guild.members.cache.filter((m) => !m.user.bot).size}** пользователей (из них ${guild.members.cache.filter((m) => m.user.bot).size} ботов)`);
this.client.channels.cache.get(this.client.config.support.logs).send({
embeds: [embed]
});
2022-01-04 02:18:28 +05:00
}
};