diff --git a/src/commands/501231711271780357/Lobby/list.ts b/src/commands/501231711271780357/Lobby/list.ts index 1b92d55..5dd2779 100644 --- a/src/commands/501231711271780357/Lobby/list.ts +++ b/src/commands/501231711271780357/Lobby/list.ts @@ -21,27 +21,27 @@ export default class ListLobby extends Command { const channels: eLobby[] = []; - interaction.guild.channels.cache.forEach(async (channel) => { + for (let channel of interaction.guild.channels.cache.map(x => x)) { const lobby = await eLobby.FetchOneByChannelId(channel.id); if (lobby) { channels.push(lobby); } - }); + } const embed = new EmbedBuilder() .setColor(EmbedColours.Ok) .setTitle("Lobbies") .setDescription(`Channels: ${channels.length}`); - channels.forEach(lobby => { + for (let lobby of channels) { embed.addFields([ { name: `<#${lobby.ChannelId}>`, value: `Last Used: ${lobby.LastUsed}` } ]); - }); + } await interaction.reply({ embeds: [ embed ]}); }