From 034cddfed8d23075d041691acf0a5d6723ffb5b5 Mon Sep 17 00:00:00 2001 From: JonnyBro Date: Thu, 30 Dec 2021 02:03:21 +0500 Subject: [PATCH] fix guild manager --- dashboard/routes/guild-manager.js | 3 +++ dashboard/views/manager/guild.ejs | 20 ++++++++++---------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/dashboard/routes/guild-manager.js b/dashboard/routes/guild-manager.js index 53908030..ea92252f 100644 --- a/dashboard/routes/guild-manager.js +++ b/dashboard/routes/guild-manager.js @@ -126,6 +126,9 @@ router.post("/:serverID", CheckAuth, async(req, res) => { if (data.fortniteshop === req.translate("common:NO_CHANNEL")) guildData.plugins.fortniteshop = false; else guildData.plugins.fortniteshop = guild.channels.cache.find((ch) => "#" + ch.name === data.fortniteshop).id; + if (data.birthdays === req.translate("common:NO_CHANNEL")) guildData.plugins.birthdays = false; + else guildData.plugins.birthdays = guild.channels.cache.find((ch) => "#" + ch.name === data.birthdays).id; + guildData.markModified("plugins"); }; diff --git a/dashboard/views/manager/guild.ejs b/dashboard/views/manager/guild.ejs index 8abe3f1f..4010c1ee 100644 --- a/dashboard/views/manager/guild.ejs +++ b/dashboard/views/manager/guild.ejs @@ -96,12 +96,12 @@
- - + <% if(guild.plugins.suggestions && bot.channels.cache.has(guild.plugins.suggestions)) { %> - <% guild.channels.cache.filter((ch) => ch.type === "text" && ch.id !== guild.plugins.reports).forEach((ch) => { %> + #<%= bot.channels.cache.get(guild.plugins.suggestions).name %> + <% guild.channels.cache.filter((ch) => ch.type === "text" && ch.id !== guild.plugins.suggestions).forEach((ch) => { %> <% }); %> @@ -114,12 +114,12 @@
- - + <% if(guild.plugins.reports && bot.channels.cache.has(guild.plugins.reports)) { %> - <% guild.channels.cache.filter((ch) => ch.type === "text" && ch.id !== guild.plugins.suggestions).forEach((ch) => { %> + #<%= bot.channels.cache.get(guild.plugins.reports).name %> + <% guild.channels.cache.filter((ch) => ch.type === "text" && ch.id !== guild.plugins.reports).forEach((ch) => { %> <% }); %>