Мелкие правки

This commit is contained in:
JonnyBro 2022-02-05 22:16:07 +05:00
parent 48c5968ed6
commit 128a018df4
2 changed files with 8 additions and 2 deletions

View file

@ -38,6 +38,9 @@ module.exports = class {
const owner = await guild.fetchOwner(); const owner = await guild.fetchOwner();
owner.send(messageOptions); owner.send(messageOptions);
const users = guild.members.cache.filter((m) => !m.user.bot).size;
const bots = guild.members.cache.filter((m) => m.user.bot).size;
const embed = new Discord.MessageEmbed() const embed = new Discord.MessageEmbed()
.setAuthor({ .setAuthor({
name: guild.name, name: guild.name,
@ -46,7 +49,7 @@ module.exports = class {
}) })
}) })
.setColor("#32CD32") .setColor("#32CD32")
.setDescription(`Зашёл на сервер **${guild.name}**. На нём **${guild.members.cache.filter((m) => !m.user.bot).size}** пользователей (из них ${guild.members.cache.filter((m) => m.user.bot).size} ботов)`); .setDescription(`Зашёл на сервер **${guild.name}**. На нём **${users}** ${this.client.getNoun(users, this.client.translate("misc:NOUNS:MEMBERS:1"), this.client.translate("misc:NOUNS:MEMBERS:2"), this.client.translate("misc:NOUNS:MEMBERS:5"))} (из них ${bots} ${this.client.getNoun(bots, this.client.translate("misc:NOUNS:BOTS:1"), this.client.translate("misc:NOUNS:BOTS:2"), this.client.translate("misc:NOUNS:BOTS:5"))})`);
this.client.channels.cache.get(this.client.config.support.logs).send({ this.client.channels.cache.get(this.client.config.support.logs).send({
embeds: [embed] embeds: [embed]
}); });

View file

@ -6,6 +6,9 @@ module.exports = class {
} }
async run(guild) { async run(guild) {
const users = guild.members.cache.filter((m) => !m.user.bot).size;
const bots = guild.members.cache.filter((m) => m.user.bot).size;
const embed = new Discord.MessageEmbed() const embed = new Discord.MessageEmbed()
.setAuthor({ .setAuthor({
name: guild.name, name: guild.name,
@ -14,7 +17,7 @@ module.exports = class {
}) })
}) })
.setColor("#B22222") .setColor("#B22222")
.setDescription(`Вышел с сервера **${guild.name}**. На нём **${guild.members.cache.filter((m) => !m.user.bot).size}** пользователей (из них ${guild.members.cache.filter((m) => m.user.bot).size} ботов)`); .setDescription(`Вышел с сервера **${guild.name}**. На нём **${users}** ${this.client.getNoun(users, this.client.translate("misc:NOUNS:MEMBERS:1"), this.client.translate("misc:NOUNS:MEMBERS:2"), this.client.translate("misc:NOUNS:MEMBERS:5"))} (из них ${bots} ${this.client.getNoun(bots, this.client.translate("misc:NOUNS:BOTS:1"), this.client.translate("misc:NOUNS:BOTS:2"), this.client.translate("misc:NOUNS:BOTS:5"))})`);
this.client.channels.cache.get(this.client.config.support.logs).send({ this.client.channels.cache.get(this.client.config.support.logs).send({
embeds: [embed] embeds: [embed]
}); });