update/view configured channels via config
This commit is contained in:
2 files changed
+31
-1
No files matched your search
@@ -100,6 +100,12 @@ module.exports = {
|
|||||||
description: "Clears all configured channels",
|
description: "Clears all configured channels",
|
||||||
value: "clear",
|
value: "clear",
|
||||||
type: CommandOptions.SubCommand,
|
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) });
|
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':
|
case 'bot_admin_role':
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "dayzr-bot",
|
"name": "dayzr-bot",
|
||||||
"version": "13.3.7",
|
"version": "13.3.8",
|
||||||
"description": "A General Purpose Discord Bot for DayZ Nitrado Servers.",
|
"description": "A General Purpose Discord Bot for DayZ Nitrado Servers.",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"nodemonConfig": {
|
"nodemonConfig": {
|
||||||
|
|||||||
Reference in new issue
Block a user