4.2.1 debug factions command with 0 factions

This commit is contained in:
SowinskiBraeden committed 2022-12-07 18:01:57 -08:00
1 parent 4f7c31ecad
commit 208b61f1b9
2 files changed
+10 -6

No files matched your search

+9 -5
View File
@@ -26,12 +26,16 @@ module.exports = {
let factions = new EmbedBuilder() let factions = new EmbedBuilder()
.setColor(client.config.Colors.Default) .setColor(client.config.Colors.Default)
.setTitle('Factions & Armbands') .setTitle('Factions & Armbands')
let description = ''; let description = '';
for (const [factionID, data] of Object.entries(GuildDB.factionArmbands)) { if (GuildDB.usedArmbands.length == 0) {
if (description == "") description += `> <@&${factionID}> - ${data.armband}`; description = '> There are no factions that have claimed armbands.';
else description += `\n> <@&${factionID}> - *${data.armband}*`; } else {
for (const [factionID, data] of Object.entries(GuildDB.factionArmbands)) {
if (description == "") description += `> <@&${factionID}> - ${data.armband}`;
else description += `\n> <@&${factionID}> - *${data.armband}*`;
}
} }
factions.setDescription(description); factions.setDescription(description);
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "dayz-armbands", "name": "dayz-armbands",
"version": "4.2.0", "version": "4.2.1",
"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": {