4.4.0 exlcuded list command
This commit is contained in:
3 files changed
+52
-3
No files matched your search
+5
-2
@@ -264,14 +264,17 @@ module.exports = {
|
|||||||
const channelColor = GuildDB.customChannelStatus ? '+ ' : '- ';
|
const channelColor = GuildDB.customChannelStatus ? '+ ' : '- ';
|
||||||
const botAdminRole = GuildDB.botAdmin ? `\n╚➤ <@&${GuildDB.botAdmin}>` : '';
|
const botAdminRole = GuildDB.botAdmin ? `\n╚➤ <@&${GuildDB.botAdmin}>` : '';
|
||||||
const botAdminRoleColor = GuildDB.botAdmin ? `+ ` : '- ';
|
const botAdminRoleColor = GuildDB.botAdmin ? `+ ` : '- ';
|
||||||
|
const excludedRolesColor = GuildDB.excludedRoles.length > 0 ? `+ ` : '- ';
|
||||||
|
const excludedRolesInfo = GuildDB.excludedRoles.length > 0 ? '\n╚➤ \`/excluded\` to view' : '';
|
||||||
|
|
||||||
const settingsEmbed = new EmbedBuilder()
|
const settingsEmbed = new EmbedBuilder()
|
||||||
.setColor(client.config.Colors.Default)
|
.setColor(client.config.Colors.Default)
|
||||||
.setTitle('Current Guild Configurations')
|
.setTitle('Current Guild Configurations')
|
||||||
.addFields(
|
.addFields(
|
||||||
{ name: 'Guild ID', value: `\`\`\`arm\n${GuildDB.serverID}\`\`\``, inline: true },
|
{ name: 'Guild ID', value: `\`\`\`arm\n${GuildDB.serverID}\`\`\``, inline: true },
|
||||||
{ name: 'Has Allowed Channels?', value: `\`\`\`diff\n${channelColor}${GuildDB.customChannelStatus}\`\`\`${channelsInfo}`, inline: true },
|
{ name: 'Has Allowed Channels?', value: `\`\`\`diff\n${channelColor}${GuildDB.customChannelStatus}\`\`\`${channelsInfo}`, inline: true },
|
||||||
{ name: 'Has bot admin role?', value: `\`\`\`diff\n${botAdminRoleColor}${client.exists(GuildDB.botAdmin)}\`\`\`${botAdminRole}`, inline: true },
|
{ name: 'Has bot admin role?', value: `\`\`\`diff\n${botAdminRoleColor}${client.exists(GuildDB.botAdmin)}\`\`\`${botAdminRole}`, inline: true },
|
||||||
|
{ name: 'Excluded roles?', value: `\`\`\`diff\n${excludedRolesColor}${GuildDB.excludedRoles.length > 0}\`\`\`${excludedRolesInfo}` },
|
||||||
);
|
);
|
||||||
|
|
||||||
return interaction.send({ embeds: [settingsEmbed] });
|
return interaction.send({ embeds: [settingsEmbed] });
|
||||||
|
|||||||
@@ -0,0 +1,46 @@
|
|||||||
|
const { EmbedBuilder } = require('discord.js');
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
name: "excluded",
|
||||||
|
debug: false,
|
||||||
|
global: false,
|
||||||
|
description: "view a list of excluded roles",
|
||||||
|
usage: "",
|
||||||
|
permissions: {
|
||||||
|
channel: ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"],
|
||||||
|
member: [],
|
||||||
|
},
|
||||||
|
options: [],
|
||||||
|
SlashCommand: {
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {require("../structures/QuarksBot")} client
|
||||||
|
* @param {import("discord.js").Message} message
|
||||||
|
* @param {string[]} args
|
||||||
|
* @param {*} param3
|
||||||
|
*/
|
||||||
|
run: async (client, interaction, args, { GuildDB }) => {
|
||||||
|
if (GuildDB.excludedRoles.length == 0) {
|
||||||
|
let noExcludes = new EmbedBuilder()
|
||||||
|
.setColor(client.config.Colors.Default)
|
||||||
|
.setTitle('Excluded Roles')
|
||||||
|
.setDescription('> There have been no configured channels');
|
||||||
|
|
||||||
|
return interaction.send({ embeds: [noExcludes] });
|
||||||
|
}
|
||||||
|
|
||||||
|
let excluded = new EmbedBuilder()
|
||||||
|
.setColor(client.config.Colors.Default)
|
||||||
|
.setTitle('Channels')
|
||||||
|
|
||||||
|
let des = '*These roles you cannot use to claim an armband.';
|
||||||
|
for (let i = 0; i < GuildDB.excludedRoles.length; i++) {
|
||||||
|
des += `\n> <@&${GuildDB.excludedRoles[i]}>`;
|
||||||
|
}
|
||||||
|
excluded.setDescription(des);
|
||||||
|
|
||||||
|
return interaction.send({ embeds: [excluded] });
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Interactions: {}
|
||||||
|
}
|
||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "dayz-armbands",
|
"name": "dayz-armbands",
|
||||||
"version": "4.3.2",
|
"version": "4.4.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