update/view configured channels via config

This commit is contained in:
SowinskiBraeden committed 2024-11-10 18:16:17 -08:00
1 parent d4cf9ec613
commit 5e0a45554f
2 files changed
+31 -1

No files matched your search

+30
View File
@@ -100,6 +100,12 @@ module.exports = {
description: "Clears all configured channels",
value: "clear",
type: CommandOptions.SubCommand,
},
{
name: "view",
description: "View configured allowed channels",
value: "view",
type: CommandOptionTypes.SubCommand,
}
]
},
@@ -478,6 +484,30 @@ module.exports = {
return interaction.send({ embeds: [promptClearChannels], components: [optClearChannels], flags: (1 << 6) });
} else if (channels_config == 'view') {
if (!GuildDB.customChannelStatus) {
const noConfiguredChannels = new EmbedBuilder()
.setColor(client.config.Colors.Default)
.setTitle('Channels')
.setDescription('> There are no configured channels');
return interaction.send({ embeds: [noConfiguredChannels] });
}
const configuredChannels = 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]}>`;
}
configuredChannels.setDescription(des);
return interaction.send({ embeds: [configuredChannels] });
}
case 'bot_admin_role':
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "dayzr-bot",
"version": "13.3.7",
"version": "13.3.8",
"description": "A General Purpose Discord Bot for DayZ Nitrado Servers.",
"main": "index.js",
"nodemonConfig": {