tournament-helper-bot/commands/events/view_blacklist.js

21 lines
678 B
JavaScript
Raw Permalink Normal View History

2024-12-28 14:04:25 +00:00
const { SlashCommandBuilder, EmbedBuilder } = require('discord.js');
const { blacklist } = require("../../index.js");
module.exports = {
data: new SlashCommandBuilder()
.setName('view_blacklist')
.setDescription('Посмотреть на черный список'),
async execute(interaction) {
console.log(blacklist);
const embed = new EmbedBuilder()
.setColor(0x0000FF)
.setTitle(`Игроков в ЧС: ${blacklist.size}`)
let ds = blacklist.size === 0 ? '*Пусто*' : '';
blacklist.forEach((value, key, map) => {
ds += `<@${value}>\n`;
});
embed.setDescription(ds)
interaction.reply({ embeds: [embed] });
},
};