From 4b0d89899ad6fb36579a846a793ba2a952a91ba7 Mon Sep 17 00:00:00 2001 From: Braeden Sowinski Date: Sun, 7 Aug 2022 23:11:17 -0700 Subject: [PATCH] debug channels command --- commands/channels.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/commands/channels.js b/commands/channels.js index 30b2b9b..12202c8 100644 --- a/commands/channels.js +++ b/commands/channels.js @@ -29,15 +29,14 @@ module.exports = { let channels = ``; for (let i = 0; i < guild.server.allowedChannels.length; i++) { - if (guild.server.allowedChannels[i] == undefined) break; - if (channels.length==0) channels += `<#${guild.server.allowedChannels[i]}>`; + if (client.exists(guild.server.allowedChannels[i])) continue; else channels += `\n<#${guild.server.allowedChannels[i]}>`; } let channelsEmbed = new MessageEmbed() .setColor('#0099ff') .setDescription('**Allowed Channels to use the Bot**') .addFields( - { name: `There are currently ${guild.server.allowedChannels.length} allowed channels.`, value: `${channels}`, inline: true }, + { name: `There are currently ${guild.server.allowedChannels.length} allowed channels.`, value: `Channels:${channels}`, inline: true }, ) .setFooter('LPS Website Support', client.config.IconURL, 'https://discord.gg/jgUW656v2t') return interaction.send({ embeds: [channelsEmbed] });