4.2.0 - add /channels feature
This commit is contained in:
2 files changed
+23
-10
No files matched your search
+22
-9
@@ -1,4 +1,4 @@
|
|||||||
const { ModalBuilder } = require('discord.js');
|
const { EmbedBuilder } = require('discord.js');
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: "channels",
|
name: "channels",
|
||||||
@@ -20,14 +20,27 @@ module.exports = {
|
|||||||
* @param {*} param3
|
* @param {*} param3
|
||||||
*/
|
*/
|
||||||
run: async (client, interaction, args, { GuildDB }) => {
|
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: {
|
Interactions: {}
|
||||||
ViewArmbads: {
|
|
||||||
run: async (client, interaction) => {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "dayz-armbands",
|
"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.",
|
"description": "A Discord Bot to handle DayZ server flags and armbands for in game factions.",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"nodemonConfig": {
|
"nodemonConfig": {
|
||||||
|
|||||||
Reference in new issue
Block a user