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] }); }, };