fixes for birthdays

This commit is contained in:
JonnyBro 2021-12-30 01:02:12 +05:00
parent 7c7931c7f8
commit 1d2a1d488f
7 changed files with 32 additions and 0 deletions

View file

@ -53,6 +53,9 @@ class Configuration extends Command {
message.translate("administration/configuration:MODLOGS", {
channel: guildData.plugins.modlogs ? `<#${guildData.plugins.modlogs}>` : message.translate("common:NOT_DEFINED")
}) + "\n" +
message.translate("administration/configuration:BIRTHDAYS", {
channel: guildData.plugins.birthdays ? `<#${guildData.plugins.birthdays}>` : message.translate("common:NOT_DEFINED")
}) + "\n" +
message.translate("administration/configuration:FORTNITESHOP", {
channel: guildData.plugins.fortniteshop ? `<#${guildData.plugins.fortniteshop}>` : message.translate("common:NOT_DEFINED")
}) + "\n" +

View file

@ -149,6 +149,24 @@
<% } %>
</select>
</div>
<div class="form-group">
<label><%= translate("common:BIRTHDAYS") %></label>
<select class="form-control" name="birthdays">
<% if(guild.plugins.birthdays && bot.channels.cache.has(guild.plugins.birthdays)) { %>
<option selected="selected">
#<%= bot.channels.cache.get(guild.plugins.birthdays).name %></option>
<% guild.channels.cache.filter((ch) => ch.type === "text" && ch.id !== guild.plugins.birthdays).forEach((ch) => { %>
<option>#<%= ch.name %></option>
<% }); %>
<option><%= translate("common:NO_CHANNEL") %></option>
<% } else { %>
<option selected="selected"><%= translate("common:NO_CHANNEL") %></option>
<% guild.channels.cache.filter((ch) => ch.type === "text").forEach((ch) => { %>
<option>#<%= ch.name %></option>
<% }); %>
<% } %>
</select>
</div>
<div class="form-group">
<label><%= translate("common:FORTNITESHOP") %></label>
<select class="form-control" name="fortniteshop">

View file

@ -16,6 +16,7 @@
"GOODBYE_DISABLED": "Goodbye messages disabled.",
"SPECIAL_CHANNELS": "Special channels",
"MODLOGS": "Moderation logs: *{{channel}}*",
"BIRTHDAYS": "Birthdays announcements: *{{channel}}*",
"FORTNITESHOP": "Fortnite daily shop: *{{channel}}*",
"SUGGESTIONS": "Suggestions: *{{channel}}*",
"REPORTS": "Reports: *{{channel}}*",

View file

@ -0,0 +1,7 @@
{
"DESCRIPTION": "Set the birthdays announcements channel!",
"USAGE": "{{prefix}}setbirthdays (#channel)",
"EXAMPLES": "{{prefix}}setbirthdays #birthdays\n{{prefix}}setbirthdays",
"SUCCESS_ENABLED": "Birthdays announcements will be sent in **{{channel}}**!",
"SUCCESS_DISABLED": "Birthdays announcements disabled!"
}

View file

@ -59,5 +59,6 @@
"FORTNITESHOP": "Fortnite shop",
"NO_CHANNEL": "No channel",
"REPORTS": "Reports",
"BIRTHDAYS": "Birthdays",
"DISCONNECT": "Disconnect"
}

View file

@ -16,6 +16,7 @@
"GOODBYE_DISABLED": "Прощальные сообщения отключены.",
"SPECIAL_CHANNELS": "Специальные каналы",
"MODLOGS": "Логи модерации: *{{channel}}*",
"BIRTHDAYS": "Поздравления с днём рождения: *{{channel}}*",
"FORTNITESHOP": "Ежедневный магазин Fortnite: *{{channel}}*",
"SUGGESTIONS": "Предложения: *{{channel}}*",
"REPORTS": "Жалобы: *{{channel}}*",

View file

@ -59,5 +59,6 @@
"FORTNITESHOP": "Магазин Fortnite",
"NO_CHANNEL": "Канал не выбран",
"REPORTS": "Жалобы",
"BIRTHDAYS": "Поздравления с днём рождения",
"DISCONNECT": "Отключить"
}