tag admins and moders in staff

This commit is contained in:
JonnyBro 2021-12-18 19:27:10 +05:00
parent 9040f7bf57
commit ae94e8f6b7

View file

@ -23,8 +23,8 @@ class Staff extends Command {
const moderators = message.guild.members.cache.filter((m) => !administrators.has(m.id) && m.hasPermission("MANAGE_MESSAGES") && !m.user.bot);
const embed = new Discord.MessageEmbed()
.setAuthor(message.translate("general/staff:TITLE", { guild: message.guild.name }))
.addField(message.translate("general/staff:ADMINS"), (administrators.size > 0 ? administrators.map((a) => `${this.client.customEmojis.status[a.presence.status]} | ${a.user.tag}`).join("\n") :message.translate("general/staff:NO_ADMINS")))
.addField(message.translate("general/staff:MODS"), (moderators.size > 0 ? moderators.map((m) => `${this.client.customEmojis.status[m.presence.status]} | ${m.user.tag}`).join("\n") : message.translate("general/staff:NO_MODS")))
.addField(message.translate("general/staff:ADMINS"), (administrators.size > 0 ? administrators.map((a) => `${this.client.customEmojis.status[a.presence.status]} | <@${a.user.id}>`).join("\n") : message.translate("general/staff:NO_ADMINS")))
.addField(message.translate("general/staff:MODS"), (moderators.size > 0 ? moderators.map((m) => `${this.client.customEmojis.status[m.presence.status]} | <@${m.user.id}>`).join("\n") : message.translate("general/staff:NO_MODS")))
.setColor(data.config.embed.color)
.setFooter(data.config.embed.footer);
message.channel.send(embed);