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;
|
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;
|
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");
|
guildData.markModified("plugins");
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -96,12 +96,12 @@
|
||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
<!-- select -->
|
<!-- select -->
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label><%= translate("common:REPORTS") %></label>
|
<label><%= translate("common:SUGGESTIONS") %></label>
|
||||||
<select class="form-control" name="reports">
|
<select class="form-control" name="suggestions">
|
||||||
<% if(guild.plugins.reports && bot.channels.cache.has(guild.plugins.reports)) { %>
|
<% if(guild.plugins.suggestions && bot.channels.cache.has(guild.plugins.suggestions)) { %>
|
||||||
<option selected="selected">
|
<option selected="selected">
|
||||||
#<%= bot.channels.cache.get(guild.plugins.reports).name %></option>
|
#<%= bot.channels.cache.get(guild.plugins.suggestions).name %></option>
|
||||||
<% guild.channels.cache.filter((ch) => ch.type === "text" && ch.id !== guild.plugins.reports).forEach((ch) => { %>
|
<% guild.channels.cache.filter((ch) => ch.type === "text" && ch.id !== guild.plugins.suggestions).forEach((ch) => { %>
|
||||||
<option>#<%= ch.name %></option>
|
<option>#<%= ch.name %></option>
|
||||||
<% }); %>
|
<% }); %>
|
||||||
<option><%= translate("common:NO_CHANNEL") %></option>
|
<option><%= translate("common:NO_CHANNEL") %></option>
|
||||||
|
@ -114,12 +114,12 @@
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label><%= translate("common:SUGGESTIONS") %></label>
|
<label><%= translate("common:REPORTS") %></label>
|
||||||
<select class="form-control" name="suggestions">
|
<select class="form-control" name="reports">
|
||||||
<% if(guild.plugins.suggestions && bot.channels.cache.has(guild.plugins.suggestions)) { %>
|
<% if(guild.plugins.reports && bot.channels.cache.has(guild.plugins.reports)) { %>
|
||||||
<option selected="selected">
|
<option selected="selected">
|
||||||
#<%= bot.channels.cache.get(guild.plugins.suggestions).name %></option>
|
#<%= bot.channels.cache.get(guild.plugins.reports).name %></option>
|
||||||
<% guild.channels.cache.filter((ch) => ch.type === "text" && ch.id !== guild.plugins.suggestions).forEach((ch) => { %>
|
<% guild.channels.cache.filter((ch) => ch.type === "text" && ch.id !== guild.plugins.reports).forEach((ch) => { %>
|
||||||
<option>#<%= ch.name %></option>
|
<option>#<%= ch.name %></option>
|
||||||
<% }); %>
|
<% }); %>
|
||||||
<option><%= translate("common:NO_CHANNEL") %></option>
|
<option><%= translate("common:NO_CHANNEL") %></option>
|
||||||
|
|
Loading…
Reference in a new issue