mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-22 05:04:58 +05:00
fix guild manager
This commit is contained in:
parent
0d07a350c8
commit
034cddfed8
2 changed files with 13 additions and 10 deletions
|
@ -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");
|
||||
};
|
||||
|
||||
|
|
|
@ -96,12 +96,12 @@
|
|||
<div class="box-body">
|
||||
<!-- select -->
|
||||
<div class="form-group">
|
||||
<label><%= translate("common:REPORTS") %></label>
|
||||
<select class="form-control" name="reports">
|
||||
<% if(guild.plugins.reports && bot.channels.cache.has(guild.plugins.reports)) { %>
|
||||
<label><%= translate("common:SUGGESTIONS") %></label>
|
||||
<select class="form-control" name="suggestions">
|
||||
<% if(guild.plugins.suggestions && bot.channels.cache.has(guild.plugins.suggestions)) { %>
|
||||
<option selected="selected">
|
||||
#<%= bot.channels.cache.get(guild.plugins.reports).name %></option>
|
||||
<% guild.channels.cache.filter((ch) => ch.type === "text" && ch.id !== guild.plugins.reports).forEach((ch) => { %>
|
||||
#<%= bot.channels.cache.get(guild.plugins.suggestions).name %></option>
|
||||
<% guild.channels.cache.filter((ch) => ch.type === "text" && ch.id !== guild.plugins.suggestions).forEach((ch) => { %>
|
||||
<option>#<%= ch.name %></option>
|
||||
<% }); %>
|
||||
<option><%= translate("common:NO_CHANNEL") %></option>
|
||||
|
@ -114,12 +114,12 @@
|
|||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label><%= translate("common:SUGGESTIONS") %></label>
|
||||
<select class="form-control" name="suggestions">
|
||||
<% if(guild.plugins.suggestions && bot.channels.cache.has(guild.plugins.suggestions)) { %>
|
||||
<label><%= translate("common:REPORTS") %></label>
|
||||
<select class="form-control" name="reports">
|
||||
<% if(guild.plugins.reports && bot.channels.cache.has(guild.plugins.reports)) { %>
|
||||
<option selected="selected">
|
||||
#<%= bot.channels.cache.get(guild.plugins.suggestions).name %></option>
|
||||
<% guild.channels.cache.filter((ch) => ch.type === "text" && ch.id !== guild.plugins.suggestions).forEach((ch) => { %>
|
||||
#<%= bot.channels.cache.get(guild.plugins.reports).name %></option>
|
||||
<% guild.channels.cache.filter((ch) => ch.type === "text" && ch.id !== guild.plugins.reports).forEach((ch) => { %>
|
||||
<option>#<%= ch.name %></option>
|
||||
<% }); %>
|
||||
<option><%= translate("common:NO_CHANNEL") %></option>
|
||||
|
|
Loading…
Reference in a new issue