diff --git a/commands/channels.js b/commands/channels.js index 77c29f5..ffdd8d3 100644 --- a/commands/channels.js +++ b/commands/channels.js @@ -1,4 +1,4 @@ -const { ModalBuilder } = require('discord.js'); +const { EmbedBuilder } = require('discord.js'); module.exports = { name: "channels", @@ -20,14 +20,27 @@ module.exports = { * @param {*} param3 */ run: async (client, interaction, args, { GuildDB }) => { - + if (!GuildDB.customChannelStatus) { + let noChannels = new EmbedBuilder() + .setColor(client.config.Colors.Default) + .setTitle('Channels') + .setDescription('> There have been no configured channels'); + + return interaction.send({ embeds: [noChannels] }); + } + + let channels = new EmbedBuilder() + .setColor(client.config.Colors.Default) + .setTitle('Channels') + let des; + for (let i = 0; i < GuildDB.allowedChannels.length; i++) { + if (i == 0) des += `> <#${GuildDB.allowedChannels[i]}>`; + else des += `\n > <#${GuildDB.allowedChannels[i]}>`; + } + channels.setDescription(des); + + return interaction.send({ embeds: [channels] }); }, }, - Interactions: { - ViewArmbads: { - run: async (client, interaction) => { - - } - } - } + Interactions: {} } diff --git a/package.json b/package.json index 170b4c7..4767e18 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dayz-armbands", - "version": "4.1.10", + "version": "4.2.0", "description": "A Discord Bot to handle DayZ server flags and armbands for in game factions.", "main": "index.js", "nodemonConfig": {