const { SlashCommandBuilder, MessageFlags, EmbedBuilder } = require('discord.js'); const { Tournament } = require("../../data_objects/tournament.js"); const { tetrioRanks } = require("../../data_objects/tetrio_ranks.js"); const { xhr } = require("../../utils.js"); const { tournaments, blacklist, whitelist } = require("../../index.js"); module.exports = { data: new SlashCommandBuilder() .setName('get_participant_list') .setDescription('Получить список участников') .addStringOption(option => option.setName('key') .setDescription('Время создания события') .setRequired(true)), async execute(interaction) { console.log(tournaments); const t = tournaments.get(interaction.options.getString('key')) t.checked_in.sort((a, b) => b.tr - a.tr); interaction.reply({ content: `${t.checked_in.map((element) => `${element.username}\n`)}` }); }, };