mirror of
https://github.com/JonnyBro/JaBa.git
synced 2025-04-01 11:40:47 +05:00
many fixes and dashboard settings done
This commit is contained in:
parent
e80924eef4
commit
54d9a7650d
25 changed files with 5612 additions and 470 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -20,8 +20,10 @@
|
|||
.vscode
|
||||
|
||||
# Node
|
||||
package-lock.json
|
||||
node_modules
|
||||
|
||||
# SQlite
|
||||
/json.sqlite
|
||||
|
||||
# Sessions Store
|
||||
sessions
|
|
@ -34,10 +34,9 @@ module.exports = mongoose.model("Guild", new Schema({
|
|||
kick: false,
|
||||
ban: false,
|
||||
},
|
||||
news: false,
|
||||
suggestions: false,
|
||||
modlogs: false,
|
||||
birthdays: false,
|
||||
reports: false,
|
||||
birthdays: false,
|
||||
modlogs: false,
|
||||
} },
|
||||
}));
|
|
@ -32,7 +32,6 @@ class JaBa extends Client {
|
|||
this.databaseCache.guilds = new Collection();
|
||||
this.databaseCache.members = new Collection();
|
||||
this.databaseCache.usersReminds = new Collection();
|
||||
this.databaseCache.mutedUsers = new Collection();
|
||||
|
||||
this.player = Player.singleton(this, {
|
||||
autoRegisterExtractor: false,
|
||||
|
|
|
@ -64,7 +64,7 @@ class Automod extends BaseCommand {
|
|||
return interaction.success("administration/automod:ENABLED");
|
||||
} else {
|
||||
if (channel) {
|
||||
data.guildData.plugins.automod.ignored.push(channel);
|
||||
data.guildData.plugins.automod.ignored.push(channel.id);
|
||||
data.guildData.markModified("plugins.automod");
|
||||
await data.guildData.save();
|
||||
|
||||
|
|
|
@ -39,7 +39,6 @@ class Config extends BaseCommand {
|
|||
.setChoices(
|
||||
{ name: client.translate("administration/config:BIRTHDAYS"), value: "birthdays" },
|
||||
{ name: client.translate("administration/config:MODLOGS"), value: "modlogs" },
|
||||
{ name: client.translate("administration/config:NEWS"), value: "news" },
|
||||
{ name: client.translate("administration/config:REPORTS"), value: "reports" },
|
||||
{ name: client.translate("administration/config:SUGGESTIONS"), value: "suggestions" },
|
||||
)
|
||||
|
@ -129,12 +128,9 @@ class Config extends BaseCommand {
|
|||
},
|
||||
{
|
||||
name: interaction.translate("administration/config:SPECIAL_CHANNELS"),
|
||||
value: interaction.translate("administration/config:NEWS_LIST", {
|
||||
channel: guildData.plugins.news ? `<#${guildData.plugins.news}>` : `*${interaction.translate("common:NOT_DEFINED")}*`,
|
||||
value: interaction.translate("administration/config:SUGGESTIONS_LIST", {
|
||||
channel: guildData.plugins.suggestions ? `<#${guildData.plugins.suggestions}>` : `*${interaction.translate("common:NOT_DEFINED")}*`,
|
||||
}) + "\n" +
|
||||
interaction.translate("administration/config:SUGGESTIONS_LIST", {
|
||||
channel: guildData.plugins.suggestions ? `<#${guildData.plugins.suggestions}>` : `*${interaction.translate("common:NOT_DEFINED")}*`,
|
||||
}) + "\n" +
|
||||
interaction.translate("administration/config:REPORTS_LIST", {
|
||||
channel: guildData.plugins.reports ? `<#${guildData.plugins.reports}>` : `*${interaction.translate("common:NOT_DEFINED")}*`,
|
||||
}) + "\n" +
|
||||
|
@ -145,10 +141,10 @@ class Config extends BaseCommand {
|
|||
channel: guildData.plugins.birthdays ? `<#${guildData.plugins.birthdays}>` : `*${interaction.translate("common:NOT_DEFINED")}*`,
|
||||
}),
|
||||
},
|
||||
// {
|
||||
// name: interaction.translate("administration/config:DASHBOARD_TITLE"),
|
||||
// value: `[${interaction.translate("administration/config:DASHBOARD_CONTENT")}](${client.config.dashboard.baseURL})`
|
||||
// }
|
||||
{
|
||||
name: interaction.translate("administration/config:DASHBOARD_TITLE"),
|
||||
value: `[${interaction.translate("administration/config:DASHBOARD_CONTENT")}](${client.config.dashboard.domain})`,
|
||||
},
|
||||
]);
|
||||
|
||||
interaction.reply({
|
||||
|
@ -193,11 +189,10 @@ async function changeSetting(interaction, setting, state, channel) {
|
|||
content: `${interaction.translate(`administration/config:${setting.toUpperCase()}`)}: **${interaction.translate("common:ENABLED")}** (${channel.toString()})`,
|
||||
ephemeral: true,
|
||||
});
|
||||
} else
|
||||
return interaction.reply({
|
||||
content: `${interaction.translate(`administration/config:${setting.toUpperCase()}`)}: ${interaction.guild.data.plugins[setting] ? `**${interaction.translate("common:ENABLED")}** (<#${interaction.guild.data.plugins[setting]}>)` : `**${interaction.translate("common:DISABLED")}**`}`,
|
||||
ephemeral: true,
|
||||
});
|
||||
} else return interaction.reply({
|
||||
content: `${interaction.translate(`administration/config:${setting.toUpperCase()}`)}: ${interaction.guild.data.plugins[setting] ? `**${interaction.translate("common:ENABLED")}** (<#${interaction.guild.data.plugins[setting]}>)` : `**${interaction.translate("common:DISABLED")}**`}`,
|
||||
ephemeral: true,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -79,7 +79,7 @@ class Profile extends BaseCommand {
|
|||
.addFields([
|
||||
{
|
||||
name: client.customEmojis.link + " " + interaction.translate("economy/profile:LINK"),
|
||||
value: `[${interaction.translate("economy/profile:LINK_TEXT")}](${client.config.dashboard.baseURL}/user/${member.user.id}/${interaction.guild.id})`,
|
||||
value: `[${interaction.translate("economy/profile:LINK_TEXT")}](${client.config.dashboard.domain}/user/${member.user.id}/${interaction.guild.id})`,
|
||||
},
|
||||
{
|
||||
name: interaction.translate("economy/profile:BIO"),
|
||||
|
|
|
@ -49,7 +49,7 @@ class Serverinfo extends BaseCommand {
|
|||
.addFields([
|
||||
{
|
||||
name: client.customEmojis.link + " " + interaction.translate("general/serverinfo:LINK"),
|
||||
value: `[${interaction.translate("general/serverinfo:LINK_TEXT")}](${client.config.dashboard.baseURL}/stats/${guild.id})`,
|
||||
value: `[${interaction.translate("general/serverinfo:LINK_TEXT")}](${client.config.dashboard.domain}/stats/${guild.id})`,
|
||||
},
|
||||
{
|
||||
name: client.customEmojis.title + interaction.translate("common:NAME"),
|
||||
|
|
|
@ -90,7 +90,7 @@ class Stats extends BaseCommand {
|
|||
{
|
||||
name: client.customEmojis.link + " " + interaction.translate("general/stats:LINKS_TITLE"),
|
||||
value: interaction.translate("misc:STATS_FOOTER", {
|
||||
dashboardLink: client.config.dashboard.baseURL,
|
||||
dashboardLink: client.config.dashboard.domain,
|
||||
supportLink: "https://discord.gg/Ptkj2n9nzZ",
|
||||
inviteLink: client.generateInvite({ scopes: ["bot", "applications.commands"], permissions: [ PermissionsBitField.Flags.Administrator ] }),
|
||||
donateLink: "https://www.donationalerts.com/r/jonny_bro",
|
||||
|
|
|
@ -74,9 +74,9 @@ class Warn extends BaseCommand {
|
|||
if (submitted) {
|
||||
const reason = submitted.fields.getTextInputValue("warn_reason");
|
||||
|
||||
const sanctions = memberData.sanctions.filter(s => s.type === "warn").length;
|
||||
const banCount = data.guildData.plugins.warnsSanctions.ban;
|
||||
const kickCount = data.guildData.plugins.warnsSanctions.kick;
|
||||
// const sanctions = memberData.sanctions.filter(s => s.type === "warn").length;
|
||||
// const banCount = data.guildData.plugins.warnsSanctions.ban;
|
||||
// const kickCount = data.guildData.plugins.warnsSanctions.kick;
|
||||
|
||||
const caseInfo = {
|
||||
moderator: interaction.member.id,
|
||||
|
@ -101,7 +101,7 @@ class Warn extends BaseCommand {
|
|||
inline: true,
|
||||
},
|
||||
]);
|
||||
|
||||
/*
|
||||
if (banCount) {
|
||||
if (sanctions >= banCount) {
|
||||
member.send({
|
||||
|
@ -122,6 +122,7 @@ class Warn extends BaseCommand {
|
|||
.setColor(client.config.embed.color);
|
||||
|
||||
interaction.guild.members.ban(member).catch(() => {});
|
||||
|
||||
interaction.followUp({
|
||||
content: interaction.translate("moderation/setwarns:AUTO_BAN", {
|
||||
user: member.user.discriminator === "0" ? member.user.username : member.user.tag,
|
||||
|
@ -151,6 +152,7 @@ class Warn extends BaseCommand {
|
|||
.setColor(client.config.embed.color);
|
||||
|
||||
member.kick().catch(() => {});
|
||||
|
||||
interaction.followUp({
|
||||
content: interaction.translate("moderation/setwarns:AUTO_KICK", {
|
||||
user: member.user.discriminator === "0" ? member.user.username : member.user.tag,
|
||||
|
@ -159,7 +161,7 @@ class Warn extends BaseCommand {
|
|||
});
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
member.send({
|
||||
content: interaction.translate("moderation/warn:WARNED_DM", {
|
||||
user: member.user.discriminator === "0" ? member.user.username : member.user.tag,
|
||||
|
|
|
@ -1,93 +0,0 @@
|
|||
const { SlashCommandBuilder, EmbedBuilder, ChannelType } = require("discord.js");
|
||||
const BaseCommand = require("../../base/BaseCommand");
|
||||
|
||||
class Announcement extends BaseCommand {
|
||||
/**
|
||||
*
|
||||
* @param {import("../base/JaBa")} client
|
||||
*/
|
||||
constructor(client) {
|
||||
super({
|
||||
command: new SlashCommandBuilder()
|
||||
.setName("announcement")
|
||||
.setDescription(client.translate("owner/announcement:DESCRIPTION"))
|
||||
.setDescriptionLocalizations({
|
||||
"uk": client.translate("owner/announcement:DESCRIPTION", null, "uk-UA"),
|
||||
"ru": client.translate("owner/announcement:DESCRIPTION", null, "ru-RU"),
|
||||
})
|
||||
.setDMPermission(true)
|
||||
.addStringOption(option => option.setName("message")
|
||||
.setDescription(client.translate("common:MESSAGE"))
|
||||
.setDescriptionLocalizations({
|
||||
"uk": client.translate("common:MESSAGE", null, "uk-UA"),
|
||||
"ru": client.translate("common:MESSAGE", null, "ru-RU"),
|
||||
})
|
||||
.setRequired(true))
|
||||
.addBooleanOption(option => option.setName("tag")
|
||||
.setDescription(client.translate("owner/announcement:TAG"))
|
||||
.setDescriptionLocalizations({
|
||||
"uk": client.translate("owner/announcement:TAG", null, "uk-UA"),
|
||||
"ru": client.translate("owner/announcement:TAG", null, "ru-RU"),
|
||||
})
|
||||
.setRequired(true))
|
||||
.addBooleanOption(option => option.setName("important")
|
||||
.setDescription(client.translate("owner/announcement:IMPORTANT"))
|
||||
.setDescriptionLocalizations({
|
||||
"uk": client.translate("owner/announcement:IMPORTANT", null, "uk-UA"),
|
||||
"ru": client.translate("owner/announcement:IMPORTANT", null, "ru-RU"),
|
||||
})),
|
||||
aliases: [],
|
||||
dirname: __dirname,
|
||||
ownerOnly: true,
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param {import("../../base/JaBa")} client
|
||||
*/
|
||||
async onLoad() {
|
||||
//...
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param {import("../../base/JaBa")} client
|
||||
* @param {import("discord.js").ChatInputCommandInteraction} interaction
|
||||
* @param {Object} data
|
||||
*/
|
||||
async execute(client, interaction) {
|
||||
await interaction.deferReply({ ephemeral: true });
|
||||
const text = interaction.options.getString("message"),
|
||||
important = interaction.options.getBoolean("important");
|
||||
if (text.length > 1000) return interaction.error("owner/announcement:TOO_LONG");
|
||||
|
||||
const embed = new EmbedBuilder()
|
||||
.setAuthor({
|
||||
name: interaction.translate("owner/announcement:TITLE"),
|
||||
})
|
||||
.setDescription(text)
|
||||
.setColor(client.config.embed.color)
|
||||
.setFooter({
|
||||
text: interaction.user.discriminator === "0" ? interaction.user.username : interaction.user.tag,
|
||||
})
|
||||
.setTimestamp();
|
||||
|
||||
(await client.guilds.fetch()).forEach(async guild => {
|
||||
if (guild.id === "568120814776614924") return;
|
||||
|
||||
guild = await guild.fetch();
|
||||
const channel = important ? (guild?.data?.plugins.news ? guild.channels.cache.get(guild?.data?.plugins.news) : guild.channels.cache.find(c => c.type === ChannelType.GuildText)) : guild.channels.cache.get(guild?.data?.plugins.news);
|
||||
|
||||
channel.send({
|
||||
content: `${interaction.options.getBoolean("tag") ? "||@everyone|| " : ""}ВАЖНОЕ ОБЪЯВЛЕНИЕ!`,
|
||||
embeds: [embed],
|
||||
});
|
||||
});
|
||||
|
||||
interaction.editReply({
|
||||
content: interaction.translate("owner/announcement:SENDED"),
|
||||
ephemeral: true,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Announcement;
|
|
@ -1,7 +1,9 @@
|
|||
const SoftUI = require("./dashboard-core/theme/dbd-soft-ui"),
|
||||
DBD = require("./dashboard-core/index");
|
||||
DBD = require("./dashboard-core/index"),
|
||||
session = require("express-session"),
|
||||
FileStore = require("session-file-store")(session);
|
||||
|
||||
const { PermissionsBitField } = require("discord.js");
|
||||
const { PermissionsBitField, ChannelType } = require("discord.js");
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -43,10 +45,11 @@ module.exports.load = async client => {
|
|||
secret: client.config.dashboard.secret,
|
||||
},
|
||||
cookiesSecret: client.config.dashboard.secret,
|
||||
sessionSaveSession: new FileStore,
|
||||
domain: client.config.dashboard.domain,
|
||||
redirectUri: `${client.config.dashboard.domain}${client.config.dashboard.port !== 80 ? `:${client.config.dashboard.port}` : ""}/discord/callback`,
|
||||
bot: client,
|
||||
ownerIDs: [ client.config.owner ],
|
||||
ownerIDs: [ client.config.owner.id ],
|
||||
requiredPermissions: PermissionsBitField.Flags.ViewChannel,
|
||||
minimizedConsoleLogs: true,
|
||||
invite: {
|
||||
|
@ -190,9 +193,9 @@ module.exports.load = async client => {
|
|||
},
|
||||
commands: categories,
|
||||
locales: {
|
||||
enUS: require("../languages/en-US/dashboard.json").DASHBOARD,
|
||||
ruRU: require("../languages/ru-RU/dashboard.json").DASHBOARD,
|
||||
ukUA: require("../languages/uk-UA/dashboard.json").DASHBOARD,
|
||||
enUS: require("../languages/en-US/dashboard.json"),
|
||||
ruRU: require("../languages/ru-RU/dashboard.json"),
|
||||
ukUA: require("../languages/uk-UA/dashboard.json"),
|
||||
},
|
||||
}),
|
||||
customPages: [
|
||||
|
@ -221,7 +224,7 @@ module.exports.load = async client => {
|
|||
id: guild.id,
|
||||
});
|
||||
|
||||
return guildData.language || client.defaultLanguage;
|
||||
return guildData.language;
|
||||
},
|
||||
setNew: async ({ guild, newData }) => {
|
||||
const guildData = await client.findOrCreateGuild({
|
||||
|
@ -235,9 +238,407 @@ module.exports.load = async client => {
|
|||
},
|
||||
},
|
||||
{
|
||||
optionType: SoftUI.formTypes.spacer(),
|
||||
title: "Plugins settings",
|
||||
description: "",
|
||||
optionId: "welcome",
|
||||
optionName: "Welcome Message",
|
||||
optionDescription: "Setup welcome message on the server",
|
||||
optionType: SoftUI.formTypes.multiRow([
|
||||
{
|
||||
optionId: "welcome_enable",
|
||||
optionName: "Enabled",
|
||||
optionDescription: "Toggle welcome messages sending",
|
||||
optionType: DBD.formTypes.switch(),
|
||||
getActualSet: async ({ guild }) => {
|
||||
const guildData = await client.findOrCreateGuild({
|
||||
id: guild.id,
|
||||
});
|
||||
|
||||
return guildData.plugins.welcome.enabled;
|
||||
},
|
||||
setNew: async ({ guild, newData }) => {
|
||||
const guildData = await client.findOrCreateGuild({
|
||||
id: guild.id,
|
||||
});
|
||||
|
||||
guildData.plugins.welcome.enabled = newData;
|
||||
await guildData.save();
|
||||
|
||||
return;
|
||||
},
|
||||
},
|
||||
{
|
||||
optionId: "welcome_image",
|
||||
optionName: "Add Image",
|
||||
optionDescription: "Toggle sending an image with welcome message",
|
||||
optionType: DBD.formTypes.switch(),
|
||||
getActualSet: async ({ guild }) => {
|
||||
const guildData = await client.findOrCreateGuild({
|
||||
id: guild.id,
|
||||
});
|
||||
|
||||
return guildData.plugins.welcome.withImage;
|
||||
},
|
||||
setNew: async ({ guild, newData }) => {
|
||||
const guildData = await client.findOrCreateGuild({
|
||||
id: guild.id,
|
||||
});
|
||||
|
||||
guildData.plugins.welcome.withImage = newData;
|
||||
await guildData.save();
|
||||
|
||||
return;
|
||||
},
|
||||
},
|
||||
{
|
||||
optionId: "welcome_message",
|
||||
optionName: "Message",
|
||||
optionDescription: "Change welcome message (You can use {user}, {server} and {membercount} wildcards)",
|
||||
optionType: DBD.formTypes.input("Welcome, {user}!", 2, 100, false, false),
|
||||
getActualSet: async ({ guild }) => {
|
||||
const guildData = await client.findOrCreateGuild({
|
||||
id: guild.id,
|
||||
});
|
||||
|
||||
return guildData.plugins.welcome.message;
|
||||
},
|
||||
setNew: async ({ guild, newData }) => {
|
||||
const guildData = await client.findOrCreateGuild({
|
||||
id: guild.id,
|
||||
});
|
||||
|
||||
guildData.plugins.welcome.message = newData !== "" ? newData : null;
|
||||
await guildData.save();
|
||||
|
||||
return;
|
||||
},
|
||||
},
|
||||
{
|
||||
optionId: "welcome_channel",
|
||||
optionName: "Channel",
|
||||
optionDescription: "Select a channel for welcome messages",
|
||||
optionType: DBD.formTypes.channelsSelect(false, [ ChannelType.GuildText ]),
|
||||
getActualSet: async ({ guild }) => {
|
||||
const guildData = await client.findOrCreateGuild({
|
||||
id: guild.id,
|
||||
});
|
||||
|
||||
return guildData.plugins.welcome.channel;
|
||||
},
|
||||
setNew: async ({ guild, newData }) => {
|
||||
const guildData = await client.findOrCreateGuild({
|
||||
id: guild.id,
|
||||
});
|
||||
|
||||
guildData.plugins.welcome.channel = newData !== "" ? newData : null;
|
||||
await guildData.save();
|
||||
|
||||
return;
|
||||
},
|
||||
},
|
||||
]),
|
||||
},
|
||||
{
|
||||
optionId: "goodbye",
|
||||
optionName: "Goodbye Message",
|
||||
optionDescription: "Setup goodbye message on the server",
|
||||
optionType: SoftUI.formTypes.multiRow([
|
||||
{
|
||||
optionId: "goodbye_enable",
|
||||
optionName: "Enabled",
|
||||
optionDescription: "Toggle goodbye messages sending",
|
||||
optionType: DBD.formTypes.switch(),
|
||||
getActualSet: async ({ guild }) => {
|
||||
const guildData = await client.findOrCreateGuild({
|
||||
id: guild.id,
|
||||
});
|
||||
|
||||
return guildData.plugins.goodbye.enabled;
|
||||
},
|
||||
setNew: async ({ guild, newData }) => {
|
||||
const guildData = await client.findOrCreateGuild({
|
||||
id: guild.id,
|
||||
});
|
||||
|
||||
guildData.plugins.goodbye.enabled = newData;
|
||||
await guildData.save();
|
||||
|
||||
return;
|
||||
},
|
||||
},
|
||||
{
|
||||
optionId: "goodbye_image",
|
||||
optionName: "Add Image",
|
||||
optionDescription: "Toggle sending an image with goodbye message",
|
||||
optionType: DBD.formTypes.switch(),
|
||||
getActualSet: async ({ guild }) => {
|
||||
const guildData = await client.findOrCreateGuild({
|
||||
id: guild.id,
|
||||
});
|
||||
|
||||
return guildData.plugins.goodbye.withImage;
|
||||
},
|
||||
setNew: async ({ guild, newData }) => {
|
||||
const guildData = await client.findOrCreateGuild({
|
||||
id: guild.id,
|
||||
});
|
||||
|
||||
guildData.plugins.goodbye.withImage = newData;
|
||||
await guildData.save();
|
||||
|
||||
return;
|
||||
},
|
||||
},
|
||||
{
|
||||
optionId: "goodbye_message",
|
||||
optionName: "Message",
|
||||
optionDescription: "Change goodbye message (You can use {user}, {server} and {membercount} wildcards)",
|
||||
optionType: DBD.formTypes.input("goodbye, {user}!", 2, 100, false, false),
|
||||
getActualSet: async ({ guild }) => {
|
||||
const guildData = await client.findOrCreateGuild({
|
||||
id: guild.id,
|
||||
});
|
||||
|
||||
return guildData.plugins.goodbye.message;
|
||||
},
|
||||
setNew: async ({ guild, newData }) => {
|
||||
const guildData = await client.findOrCreateGuild({
|
||||
id: guild.id,
|
||||
});
|
||||
|
||||
guildData.plugins.goodbye.message = newData !== "" ? newData : null;
|
||||
await guildData.save();
|
||||
|
||||
return;
|
||||
},
|
||||
},
|
||||
{
|
||||
optionId: "goodbye_channel",
|
||||
optionName: "Channel",
|
||||
optionDescription: "Select a channel for goodbye messages",
|
||||
optionType: DBD.formTypes.channelsSelect(false, [ ChannelType.GuildText ]),
|
||||
getActualSet: async ({ guild }) => {
|
||||
const guildData = await client.findOrCreateGuild({
|
||||
id: guild.id,
|
||||
});
|
||||
|
||||
return guildData.plugins.goodbye.channel;
|
||||
},
|
||||
setNew: async ({ guild, newData }) => {
|
||||
const guildData = await client.findOrCreateGuild({
|
||||
id: guild.id,
|
||||
});
|
||||
|
||||
guildData.plugins.goodbye.channel = newData !== "" ? newData : null;
|
||||
await guildData.save();
|
||||
|
||||
return;
|
||||
},
|
||||
},
|
||||
]),
|
||||
},
|
||||
{
|
||||
optionId: "autorole",
|
||||
optionName: "Auto Role",
|
||||
optionDescription: "Setup auto role on the server",
|
||||
optionType: SoftUI.formTypes.multiRow([
|
||||
{
|
||||
optionId: "autorole_enable",
|
||||
optionName: "Enabled",
|
||||
optionDescription: "Toggle auto role granting for new members",
|
||||
optionType: DBD.formTypes.switch(),
|
||||
getActualSet: async ({ guild }) => {
|
||||
const guildData = await client.findOrCreateGuild({
|
||||
id: guild.id,
|
||||
});
|
||||
|
||||
return guildData.plugins.autorole.enabled;
|
||||
},
|
||||
setNew: async ({ guild, newData }) => {
|
||||
const guildData = await client.findOrCreateGuild({
|
||||
id: guild.id,
|
||||
});
|
||||
|
||||
guildData.plugins.autorole.enabled = newData;
|
||||
await guildData.save();
|
||||
|
||||
return;
|
||||
},
|
||||
},
|
||||
{
|
||||
optionId: "autorole_role",
|
||||
optionName: "Role",
|
||||
optionDescription: "Select a role for auto role",
|
||||
optionType: DBD.formTypes.rolesSelect(false, false, true),
|
||||
getActualSet: async ({ guild }) => {
|
||||
const guildData = await client.findOrCreateGuild({
|
||||
id: guild.id,
|
||||
});
|
||||
|
||||
return guildData.plugins.autorole.role;
|
||||
},
|
||||
setNew: async ({ guild, newData }) => {
|
||||
const guildData = await client.findOrCreateGuild({
|
||||
id: guild.id,
|
||||
});
|
||||
|
||||
guildData.plugins.autorole.role = newData !== "" ? newData : null;
|
||||
await guildData.save();
|
||||
|
||||
return;
|
||||
},
|
||||
},
|
||||
]),
|
||||
},
|
||||
{
|
||||
optionId: "automod",
|
||||
optionName: "Auto Mod",
|
||||
optionDescription: "Setup auto mod on the server",
|
||||
optionType: SoftUI.formTypes.multiRow([
|
||||
{
|
||||
optionId: "automod_enable",
|
||||
optionName: "Enabled",
|
||||
optionDescription: "Toggle auto mod granting for new members",
|
||||
optionType: DBD.formTypes.switch(),
|
||||
getActualSet: async ({ guild }) => {
|
||||
const guildData = await client.findOrCreateGuild({
|
||||
id: guild.id,
|
||||
});
|
||||
|
||||
return guildData.plugins.automod.enabled;
|
||||
},
|
||||
setNew: async ({ guild, newData }) => {
|
||||
const guildData = await client.findOrCreateGuild({
|
||||
id: guild.id,
|
||||
});
|
||||
|
||||
guildData.plugins.automod.enabled = newData;
|
||||
await guildData.save();
|
||||
|
||||
return;
|
||||
},
|
||||
},
|
||||
{
|
||||
optionId: "automod_ignore",
|
||||
optionName: "Ignore channels",
|
||||
optionDescription: "Select channels for auto mod to ignore",
|
||||
optionType: DBD.formTypes.channelsMultiSelect(false, false, [ ChannelType.GuildText ]),
|
||||
getActualSet: async ({ guild }) => {
|
||||
const guildData = await client.findOrCreateGuild({
|
||||
id: guild.id,
|
||||
});
|
||||
|
||||
return guildData.plugins.automod.ignored;
|
||||
},
|
||||
setNew: async ({ guild, newData }) => {
|
||||
const guildData = await client.findOrCreateGuild({
|
||||
id: guild.id,
|
||||
});
|
||||
|
||||
guildData.plugins.automod.ignored = newData;
|
||||
await guildData.save();
|
||||
|
||||
return;
|
||||
},
|
||||
},
|
||||
]),
|
||||
},
|
||||
{
|
||||
optionId: "channels",
|
||||
optionName: "Special Channels",
|
||||
optionDescription: "Setup special channels on the server",
|
||||
optionType: SoftUI.formTypes.multiRow([
|
||||
{
|
||||
optionId: "channels_suggestions",
|
||||
optionName: "Suggestions channel",
|
||||
optionDescription: "Select channel for suggestions to go to",
|
||||
optionType: DBD.formTypes.channelsSelect(false, [ ChannelType.GuildText ]),
|
||||
getActualSet: async ({ guild }) => {
|
||||
const guildData = await client.findOrCreateGuild({
|
||||
id: guild.id,
|
||||
});
|
||||
|
||||
return guildData.plugins.suggestions;
|
||||
},
|
||||
setNew: async ({ guild, newData }) => {
|
||||
const guildData = await client.findOrCreateGuild({
|
||||
id: guild.id,
|
||||
});
|
||||
|
||||
guildData.plugins.suggestions = newData;
|
||||
await guildData.save();
|
||||
|
||||
return;
|
||||
},
|
||||
},
|
||||
{
|
||||
optionId: "channels_reports",
|
||||
optionName: "Reports channel",
|
||||
optionDescription: "Select channel for reports to go to",
|
||||
optionType: DBD.formTypes.channelsSelect(false, [ ChannelType.GuildText ]),
|
||||
getActualSet: async ({ guild }) => {
|
||||
const guildData = await client.findOrCreateGuild({
|
||||
id: guild.id,
|
||||
});
|
||||
|
||||
return guildData.plugins.reports;
|
||||
},
|
||||
setNew: async ({ guild, newData }) => {
|
||||
const guildData = await client.findOrCreateGuild({
|
||||
id: guild.id,
|
||||
});
|
||||
|
||||
guildData.plugins.reports = newData;
|
||||
await guildData.save();
|
||||
|
||||
return;
|
||||
},
|
||||
},
|
||||
{
|
||||
optionId: "channels_birthdays",
|
||||
optionName: "Birthdays channel",
|
||||
optionDescription: "Select channel for birthdays message to go to",
|
||||
optionType: DBD.formTypes.channelsSelect(false, [ ChannelType.GuildText ]),
|
||||
getActualSet: async ({ guild }) => {
|
||||
const guildData = await client.findOrCreateGuild({
|
||||
id: guild.id,
|
||||
});
|
||||
|
||||
return guildData.plugins.birthdays;
|
||||
},
|
||||
setNew: async ({ guild, newData }) => {
|
||||
const guildData = await client.findOrCreateGuild({
|
||||
id: guild.id,
|
||||
});
|
||||
|
||||
guildData.plugins.birthdays = newData;
|
||||
await guildData.save();
|
||||
|
||||
return;
|
||||
},
|
||||
},
|
||||
{
|
||||
optionId: "channels_modlogs",
|
||||
optionName: "Moderation logs channel",
|
||||
optionDescription: "Select channel for moderation logs to go to (warns)",
|
||||
optionType: DBD.formTypes.channelsSelect(false, [ ChannelType.GuildText ]),
|
||||
getActualSet: async ({ guild }) => {
|
||||
const guildData = await client.findOrCreateGuild({
|
||||
id: guild.id,
|
||||
});
|
||||
|
||||
return guildData.plugins.modlogs;
|
||||
},
|
||||
setNew: async ({ guild, newData }) => {
|
||||
const guildData = await client.findOrCreateGuild({
|
||||
id: guild.id,
|
||||
});
|
||||
|
||||
guildData.plugins.modlogs = newData;
|
||||
await guildData.save();
|
||||
|
||||
return;
|
||||
},
|
||||
},
|
||||
]),
|
||||
},
|
||||
],
|
||||
},
|
||||
|
@ -245,6 +646,7 @@ module.exports.load = async client => {
|
|||
categoryId: "test",
|
||||
categoryName: "test settings",
|
||||
categoryDescription: "ooga booba",
|
||||
categoryPermissions: PermissionsBitField.Flags.ViewChannel,
|
||||
categoryOptionsList: [
|
||||
{
|
||||
optionType: SoftUI.formTypes.spacer(),
|
||||
|
|
|
@ -54,11 +54,13 @@ class GuildMemberAdd extends BaseEvent {
|
|||
|
||||
if (guildData.plugins.welcome.enabled) {
|
||||
const channel = member.guild.channels.cache.get(guildData.plugins.welcome.channel);
|
||||
|
||||
if (channel) {
|
||||
const message = guildData.plugins.welcome.message
|
||||
.replace(/{user}/g, member)
|
||||
.replace(/{server}/g, member.guild.name)
|
||||
.replace(/{membercount}/g, member.guild.memberCount);
|
||||
|
||||
if (guildData.plugins.welcome.withImage) {
|
||||
const canvas = Canvas.createCanvas(1024, 450),
|
||||
ctx = canvas.getContext("2d");
|
||||
|
@ -128,17 +130,20 @@ class GuildMemberAdd extends BaseEvent {
|
|||
ctx.stroke();
|
||||
ctx.closePath();
|
||||
ctx.clip();
|
||||
|
||||
const avatar = await Canvas.loadImage(member.displayAvatarURL({
|
||||
extension: "jpg",
|
||||
}));
|
||||
ctx.drawImage(avatar, 45, 90, 270, 270);
|
||||
|
||||
const attachment = new AttachmentBuilder(canvas.toBuffer(), { name: "welcome-image.png" });
|
||||
|
||||
channel.send({
|
||||
content: message,
|
||||
files: [attachment],
|
||||
});
|
||||
} else channel.send({ content: message });
|
||||
} else
|
||||
channel.send({ content: message });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,11 +39,13 @@ class GuildMemberRemove extends BaseEvent {
|
|||
|
||||
if (guildData.plugins.goodbye.enabled) {
|
||||
const channel = member.guild.channels.cache.get(guildData.plugins.goodbye.channel);
|
||||
|
||||
if (channel) {
|
||||
const message = guildData.plugins.goodbye.message
|
||||
.replace(/{user}/g, member.user.discriminator === "0" ? member.user.username : member.user.tag)
|
||||
.replace(/{server}/g, member.guild.name)
|
||||
.replace(/{membercount}/g, member.guild.memberCount);
|
||||
|
||||
if (guildData.plugins.goodbye.withImage) {
|
||||
const canvas = Canvas.createCanvas(1024, 450),
|
||||
ctx = canvas.getContext("2d");
|
||||
|
@ -113,6 +115,7 @@ class GuildMemberRemove extends BaseEvent {
|
|||
ctx.stroke();
|
||||
ctx.closePath();
|
||||
ctx.clip();
|
||||
|
||||
const avatar = await Canvas.loadImage(member.displayAvatarURL({
|
||||
extension: "png",
|
||||
size: 512,
|
||||
|
@ -120,11 +123,13 @@ class GuildMemberRemove extends BaseEvent {
|
|||
ctx.drawImage(avatar, 45, 90, 270, 270);
|
||||
|
||||
const attachment = new AttachmentBuilder(canvas.toBuffer(), { name: "goodbye-image.png" });
|
||||
|
||||
channel.send({
|
||||
content: message,
|
||||
files: [attachment],
|
||||
});
|
||||
} else channel.send({ content: message });
|
||||
} else
|
||||
channel.send({ content: message });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -106,7 +106,7 @@ class MessageCreate extends BaseEvent {
|
|||
if (data.guildData.plugins.automod.enabled && !data.guildData.plugins.automod.ignored.includes(message.channel.id))
|
||||
if (/(discord\.(gg|io|me|li)\/.+|discordapp\.com\/invite\/.+)/i.test(message.content))
|
||||
if (!message.channel.permissionsFor(message.member).has(PermissionsBitField.Flags.ManageMessages)) {
|
||||
message.error("administration/automod:DELETED");
|
||||
await message.error("administration/automod:DELETED");
|
||||
message.delete();
|
||||
}
|
||||
|
||||
|
|
|
@ -31,8 +31,6 @@ class Ready extends BaseEvent {
|
|||
const birthdays = require("../helpers/birthdays");
|
||||
birthdays.init(client);
|
||||
|
||||
const checkUnmutes = require("../helpers/checkUnmutes");
|
||||
checkUnmutes.init(client);
|
||||
|
||||
const checkReminds = require("../helpers/checkReminds");
|
||||
checkReminds.init(client);
|
||||
|
|
|
@ -1,66 +0,0 @@
|
|||
const { EmbedBuilder } = require("discord.js");
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {import("../base/JaBa")} client
|
||||
*/
|
||||
module.exports.init = async function (client) {
|
||||
client.membersData
|
||||
.find({ "mute.muted": true })
|
||||
.then(members => {
|
||||
members.forEach(member => client.databaseCache.mutedUsers.set(`${member.id}${member.guildID}`, member));
|
||||
});
|
||||
setInterval(async () => {
|
||||
client.databaseCache.mutedUsers.filter(m => m.mute.endDate <= Date.now())
|
||||
.forEach(async memberData => {
|
||||
const guild = client.guilds.cache.get(memberData.guildID);
|
||||
if (!guild) return;
|
||||
|
||||
const member = guild.members.cache.get(memberData.id) || await guild.members.fetch(memberData.id).catch(() => {
|
||||
memberData.mute = {
|
||||
muted: false,
|
||||
endDate: null,
|
||||
case: null,
|
||||
};
|
||||
memberData.save();
|
||||
client.logger.log("[Unmuted] " + memberData.id + " cannot be found.");
|
||||
return;
|
||||
});
|
||||
|
||||
const guildData = await client.findOrCreateGuild({
|
||||
id: guild.id,
|
||||
});
|
||||
|
||||
if (member) {
|
||||
guild.channels.cache.forEach(channel => {
|
||||
const permOverwrites = channel.permissionOverwrites.cache.get(member.id);
|
||||
if (permOverwrites) permOverwrites.delete();
|
||||
});
|
||||
}
|
||||
|
||||
const user = member ? member.user : await client.users.fetch(memberData.id);
|
||||
const embed = new EmbedBuilder()
|
||||
.setDescription(guild.translate("moderation/unmute:SUCCESS_CASE", {
|
||||
user: user.toString(),
|
||||
usertag: user.discriminator === "0" ? user.username : user.tag,
|
||||
count: memberData.mute.case,
|
||||
}))
|
||||
.setColor("#F44271")
|
||||
.setFooter({
|
||||
text: guild.client.config.embed.footer,
|
||||
});
|
||||
|
||||
const channel = guild.channels.cache.get(guildData.plugins.modlogs);
|
||||
if (channel) channel.send({ embeds: [embed] });
|
||||
|
||||
memberData.mute = {
|
||||
muted: false,
|
||||
endDate: null,
|
||||
case: null,
|
||||
};
|
||||
|
||||
client.databaseCache.mutedUsers.delete(`${memberData.id}${memberData.guildID}`);
|
||||
await memberData.save();
|
||||
});
|
||||
}, 1000);
|
||||
};
|
|
@ -5,7 +5,6 @@
|
|||
|
||||
"BIRTHDAYS": "Birthday Greetings",
|
||||
"MODLOGS": "Moderation Logs",
|
||||
"NEWS": "Bot News",
|
||||
"REPORTS": "Reports",
|
||||
"SUGGESTIONS": "Suggestions",
|
||||
|
||||
|
|
|
@ -1,98 +1,96 @@
|
|||
{
|
||||
"DASHBOARD": {
|
||||
"name": "English",
|
||||
"index": {
|
||||
"feeds": [ "Current User", "Node version", "Users Count", "Servers Count" ],
|
||||
"card": {
|
||||
"category": "JaBa Bot",
|
||||
"title": "Simple bot made by <a href=\"https://github.com/JonnyBro\">Jonny_Bro</a>",
|
||||
"description": "Upper Text",
|
||||
"image": "",
|
||||
"footer": "Bottom Text"
|
||||
},
|
||||
"feedsTitle": "Feeds",
|
||||
"graphTitle": "Graphs"
|
||||
"name": "English",
|
||||
"index": {
|
||||
"feeds": [ "Current User", "Node version", "Users Count", "Servers Count" ],
|
||||
"card": {
|
||||
"category": "JaBa Bot",
|
||||
"title": "Simple bot made by <a href=\"https://github.com/JonnyBro\">Jonny_Bro</a>",
|
||||
"description": "Upper Text",
|
||||
"image": "",
|
||||
"footer": "Bottom Text"
|
||||
},
|
||||
"manage": {
|
||||
"settings": {
|
||||
"memberCount": "Members",
|
||||
"info": {
|
||||
"info": "Info",
|
||||
"server": "Server Information"
|
||||
}
|
||||
"feedsTitle": "Feeds",
|
||||
"graphTitle": "Graphs"
|
||||
},
|
||||
"manage": {
|
||||
"settings": {
|
||||
"memberCount": "Members",
|
||||
"info": {
|
||||
"info": "Info",
|
||||
"server": "Server Information"
|
||||
}
|
||||
}
|
||||
},
|
||||
"privacyPolicy": {
|
||||
"title": "Privacy Policy",
|
||||
"description": "Privacy Policy and Terms of Service",
|
||||
"pp": "Complete Privacy Policy"
|
||||
},
|
||||
"partials": {
|
||||
"sidebar": {
|
||||
"dash": "Dashboard",
|
||||
"manage": "Manage Guilds",
|
||||
"commands": "Commands",
|
||||
"pp": "Privacy Policy",
|
||||
"admin": "Admin",
|
||||
"account": "Account Pages",
|
||||
"login": "Sign In",
|
||||
"logout": "Sign Out"
|
||||
},
|
||||
"privacyPolicy": {
|
||||
"title": "Privacy Policy",
|
||||
"description": "Privacy Policy and Terms of Service",
|
||||
"pp": "Complete Privacy Policy"
|
||||
},
|
||||
"partials": {
|
||||
"sidebar": {
|
||||
"dash": "Dashboard",
|
||||
"navbar": {
|
||||
"home": "Home",
|
||||
"pages": {
|
||||
"manage": "Manage Guilds",
|
||||
"settings": "Manage Guilds",
|
||||
"commands": "Commands",
|
||||
"pp": "Privacy Policy",
|
||||
"admin": "Admin",
|
||||
"account": "Account Pages",
|
||||
"login": "Sign In",
|
||||
"logout": "Sign Out"
|
||||
"admin": "Admin Panel",
|
||||
"error": "Error",
|
||||
"credits": "Credits",
|
||||
"debug": "Debug",
|
||||
"leaderboard": "Leaderboard",
|
||||
"profile": "Profile",
|
||||
"maintenance": "Under Maintenance"
|
||||
}
|
||||
},
|
||||
"title": {
|
||||
"pages": {
|
||||
"manage": "Manage Guilds",
|
||||
"settings": "Manage Guilds",
|
||||
"commands": "Commands",
|
||||
"pp": "Privacy Policy",
|
||||
"admin": "Admin Panel",
|
||||
"error": "Error",
|
||||
"credits": "Credits",
|
||||
"debug": "Debug",
|
||||
"leaderboard": "Leaderboard",
|
||||
"profile": "Profile",
|
||||
"maintenance": "Under Maintenance"
|
||||
}
|
||||
},
|
||||
"sweetalert": {
|
||||
"success": {
|
||||
"login": "Successfully logged in."
|
||||
}
|
||||
},
|
||||
"preloader": {
|
||||
"text": "Page is loading..."
|
||||
},
|
||||
"premium": {
|
||||
"title": "Want more from JaBa?",
|
||||
"description": "Check out premium features below!",
|
||||
"buttonText": "Become Premium"
|
||||
},
|
||||
"settings": {
|
||||
"title": "Site Configuration",
|
||||
"description": "Configurable Viewing Options",
|
||||
"theme": {
|
||||
"title": "Site Theme",
|
||||
"description": "Make the site more appealing for your eyes!"
|
||||
},
|
||||
"navbar": {
|
||||
"home": "Home",
|
||||
"pages": {
|
||||
"manage": "Manage Guilds",
|
||||
"settings": "Manage Guilds",
|
||||
"commands": "Commands",
|
||||
"pp": "Privacy Policy",
|
||||
"admin": "Admin Panel",
|
||||
"error": "Error",
|
||||
"credits": "Credits",
|
||||
"debug": "Debug",
|
||||
"leaderboard": "Leaderboard",
|
||||
"profile": "Profile",
|
||||
"maintenance": "Under Maintenance"
|
||||
}
|
||||
},
|
||||
"title": {
|
||||
"pages": {
|
||||
"manage": "Manage Guilds",
|
||||
"settings": "Manage Guilds",
|
||||
"commands": "Commands",
|
||||
"pp": "Privacy Policy",
|
||||
"admin": "Admin Panel",
|
||||
"error": "Error",
|
||||
"credits": "Credits",
|
||||
"debug": "Debug",
|
||||
"leaderboard": "Leaderboard",
|
||||
"profile": "Profile",
|
||||
"maintenance": "Under Maintenance"
|
||||
}
|
||||
},
|
||||
"sweetalert": {
|
||||
"success": {
|
||||
"login": "Successfully logged in."
|
||||
}
|
||||
},
|
||||
"preloader": {
|
||||
"text": "Page is loading..."
|
||||
},
|
||||
"premium": {
|
||||
"title": "Want more from JaBa?",
|
||||
"description": "Check out premium features below!",
|
||||
"buttonText": "Become Premium"
|
||||
},
|
||||
"settings": {
|
||||
"title": "Site Configuration",
|
||||
"description": "Configurable Viewing Options",
|
||||
"theme": {
|
||||
"title": "Site Theme",
|
||||
"description": "Make the site more appealing for your eyes!"
|
||||
},
|
||||
"language": {
|
||||
"title": "Site Language",
|
||||
"description": "Select your preffered language!"
|
||||
}
|
||||
"language": {
|
||||
"title": "Site Language",
|
||||
"description": "Select your preffered language!"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
|
||||
"BIRTHDAYS": "Поздравления с днём рождения",
|
||||
"MODLOGS": "Логи модерации",
|
||||
"NEWS": "Новости бота",
|
||||
"REPORTS": "Жалобы",
|
||||
"SUGGESTIONS": "Предложения",
|
||||
|
||||
|
|
|
@ -1,98 +1,96 @@
|
|||
{
|
||||
"DASHBOARD": {
|
||||
"name": "Русский",
|
||||
"index": {
|
||||
"feeds": [ "Текущий пользователь", "Версия Node", "Кол-во пользователей", "Кол-во серверов" ],
|
||||
"card": {
|
||||
"category": "JaBa Bot",
|
||||
"title": "Простой бот, созданный <a href=\"https://github.com/JonnyBro\">Jonny_Bro</a>",
|
||||
"description": "Верхний текст",
|
||||
"image": "",
|
||||
"footer": "Нижний текст"
|
||||
},
|
||||
"feedsTitle": "Новости",
|
||||
"graphTitle": "Графики"
|
||||
"name": "Русский",
|
||||
"index": {
|
||||
"feeds": [ "Текущий пользователь", "Версия Node", "Кол-во пользователей", "Кол-во серверов" ],
|
||||
"card": {
|
||||
"category": "JaBa Bot",
|
||||
"title": "Простой бот, созданный <a href=\"https://github.com/JonnyBro\">Jonny_Bro</a>",
|
||||
"description": "Верхний текст",
|
||||
"image": "",
|
||||
"footer": "Нижний текст"
|
||||
},
|
||||
"manage": {
|
||||
"settings": {
|
||||
"memberCount": "Участники",
|
||||
"info": {
|
||||
"info": "Информация",
|
||||
"server": "Информация о сервере"
|
||||
}
|
||||
"feedsTitle": "Новости",
|
||||
"graphTitle": "Графики"
|
||||
},
|
||||
"manage": {
|
||||
"settings": {
|
||||
"memberCount": "Участники",
|
||||
"info": {
|
||||
"info": "Информация",
|
||||
"server": "Информация о сервере"
|
||||
}
|
||||
}
|
||||
},
|
||||
"privacyPolicy": {
|
||||
"title": "Политика конф.",
|
||||
"description": "Политика конфиденциальности и Условия использования",
|
||||
"pp": "Полная политика конфиденциальности"
|
||||
},
|
||||
"partials": {
|
||||
"sidebar": {
|
||||
"dash": "Панель управления",
|
||||
"manage": "Сервера",
|
||||
"commands": "Команды",
|
||||
"pp": "Политика конф.",
|
||||
"admin": "Админ панель",
|
||||
"account": "Аккаунт",
|
||||
"login": "Войти",
|
||||
"logout": "Выйти"
|
||||
},
|
||||
"navbar": {
|
||||
"home": "Главная",
|
||||
"pages": {
|
||||
"manage": "Настройки серверов",
|
||||
"settings": "Настройки",
|
||||
"commands": "Команды",
|
||||
"pp": "Политика конфиденциальности",
|
||||
"admin": "Админ панель",
|
||||
"error": "Ошибка",
|
||||
"credits": "Разработчики панели",
|
||||
"debug": "Отладка",
|
||||
"leaderboard": "Таблица лидеров",
|
||||
"profile": "Профиль",
|
||||
"maintenance": "Техобслуживание"
|
||||
}
|
||||
},
|
||||
"privacyPolicy": {
|
||||
"title": "Политика конф.",
|
||||
"description": "Политика конфиденциальности и Условия использования",
|
||||
"pp": "Полная политика конфиденциальности"
|
||||
},
|
||||
"partials": {
|
||||
"sidebar": {
|
||||
"dash": "Панель управления",
|
||||
"manage": "Сервера",
|
||||
"title": {
|
||||
"pages": {
|
||||
"manage": "Настройки серверов",
|
||||
"settings": "Настройки",
|
||||
"commands": "Команды",
|
||||
"pp": "Политика конф.",
|
||||
"pp": "Политика конфиденциальности",
|
||||
"admin": "Админ панель",
|
||||
"account": "Аккаунт",
|
||||
"login": "Войти",
|
||||
"logout": "Выйти"
|
||||
"error": "Ошибка",
|
||||
"credits": "Разработчики панели",
|
||||
"debug": "Отладка",
|
||||
"leaderboard": "Таблица лидеров",
|
||||
"profile": "Профиль",
|
||||
"maintenance": "Техобслуживание"
|
||||
}
|
||||
},
|
||||
"sweetalert": {
|
||||
"success": {
|
||||
"login": "Вход выполнен."
|
||||
}
|
||||
},
|
||||
"preloader": {
|
||||
"text": "Загрузка..."
|
||||
},
|
||||
"premium": {
|
||||
"title": "Хотите большего JaBa?",
|
||||
"description": "Проверьте Премиум функции!",
|
||||
"buttonText": "Стать Премиум"
|
||||
},
|
||||
"settings": {
|
||||
"title": "Настройки сайта",
|
||||
"description": "Настройте параметры панели управления",
|
||||
"theme": {
|
||||
"title": "Тема",
|
||||
"description": "У нас есть тёмная и светлая!"
|
||||
},
|
||||
"navbar": {
|
||||
"home": "Главная",
|
||||
"pages": {
|
||||
"manage": "Настройки серверов",
|
||||
"settings": "Настройки",
|
||||
"commands": "Команды",
|
||||
"pp": "Политика конфиденциальности",
|
||||
"admin": "Админ панель",
|
||||
"error": "Ошибка",
|
||||
"credits": "Разработчики панели",
|
||||
"debug": "Отладка",
|
||||
"leaderboard": "Таблица лидеров",
|
||||
"profile": "Профиль",
|
||||
"maintenance": "Техобслуживание"
|
||||
}
|
||||
},
|
||||
"title": {
|
||||
"pages": {
|
||||
"manage": "Настройки серверов",
|
||||
"settings": "Настройки",
|
||||
"commands": "Команды",
|
||||
"pp": "Политика конфиденциальности",
|
||||
"admin": "Админ панель",
|
||||
"error": "Ошибка",
|
||||
"credits": "Разработчики панели",
|
||||
"debug": "Отладка",
|
||||
"leaderboard": "Таблица лидеров",
|
||||
"profile": "Профиль",
|
||||
"maintenance": "Техобслуживание"
|
||||
}
|
||||
},
|
||||
"sweetalert": {
|
||||
"success": {
|
||||
"login": "Вход выполнен."
|
||||
}
|
||||
},
|
||||
"preloader": {
|
||||
"text": "Загрузка..."
|
||||
},
|
||||
"premium": {
|
||||
"title": "Хотите большего JaBa?",
|
||||
"description": "Проверьте Премиум функции!",
|
||||
"buttonText": "Стать Премиум"
|
||||
},
|
||||
"settings": {
|
||||
"title": "Настройки сайта",
|
||||
"description": "Настройте параметры панели управления",
|
||||
"theme": {
|
||||
"title": "Тема",
|
||||
"description": "У нас есть тёмная и светлая!"
|
||||
},
|
||||
"language": {
|
||||
"title": "Язык",
|
||||
"description": "Выберите предпочитаемый язык!"
|
||||
}
|
||||
"language": {
|
||||
"title": "Язык",
|
||||
"description": "Выберите предпочитаемый язык!"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
"GOODBYE_TITLE": "Прощання",
|
||||
"GOODBYE_CONTENT": "Канал: {{channel}}\nКартка: {{withImage}}",
|
||||
"SPECIAL_CHANNELS": "Спеціальні канали",
|
||||
"NEWS": "Новини роботи: {{channel}}",
|
||||
"MODLOGS": "Логи модерації: {{channel}}",
|
||||
"BIRTHDAYS": "Привітання з днем народження: {{channel}}",
|
||||
"SUGGESTIONS": "Пропозиції: {{channel}}",
|
||||
|
|
|
@ -1,98 +1,96 @@
|
|||
{
|
||||
"DASHBOARD": {
|
||||
"name": "Українська",
|
||||
"index": {
|
||||
"feeds": [ "Поточний Користувач", "Версія Node", "Кількість користувачів", "Кількість серверів" ],
|
||||
"card": {
|
||||
"category": "JaBa Бот",
|
||||
"title": "Простий бот, створений <a href=\"https://github.com/JonnyBro\">Jonny_Bro</a>",
|
||||
"description": "Верхній Текст",
|
||||
"image": "",
|
||||
"footer": "Нижній Текст"
|
||||
},
|
||||
"feedsTitle": "Канали",
|
||||
"graphTitle": "Графіки"
|
||||
"name": "Українська",
|
||||
"index": {
|
||||
"feeds": [ "Поточний Користувач", "Версія Node", "Кількість користувачів", "Кількість серверів" ],
|
||||
"card": {
|
||||
"category": "JaBa Бот",
|
||||
"title": "Простий бот, створений <a href=\"https://github.com/JonnyBro\">Jonny_Bro</a>",
|
||||
"description": "Верхній Текст",
|
||||
"image": "",
|
||||
"footer": "Нижній Текст"
|
||||
},
|
||||
"manage": {
|
||||
"settings": {
|
||||
"memberCount": "Учасники",
|
||||
"info": {
|
||||
"info": "Інформація",
|
||||
"server": "Інформація про Сервер"
|
||||
}
|
||||
"feedsTitle": "Канали",
|
||||
"graphTitle": "Графіки"
|
||||
},
|
||||
"manage": {
|
||||
"settings": {
|
||||
"memberCount": "Учасники",
|
||||
"info": {
|
||||
"info": "Інформація",
|
||||
"server": "Інформація про Сервер"
|
||||
}
|
||||
}
|
||||
},
|
||||
"privacyPolicy": {
|
||||
"title": "Політика Конфіденційності",
|
||||
"description": "Політика Конфіденційності та Умови Сервісу",
|
||||
"pp": "Повна Політика Конфіденційності"
|
||||
},
|
||||
"partials": {
|
||||
"sidebar": {
|
||||
"dash": "Панель Керування",
|
||||
"manage": "Налаштування серверів",
|
||||
"commands": "Команди",
|
||||
"pp": "Політика Конфіденційності",
|
||||
"admin": "Адмін",
|
||||
"account": "Сторінки Аккаунта",
|
||||
"login": "Увійти",
|
||||
"logout": "Вийти"
|
||||
},
|
||||
"privacyPolicy": {
|
||||
"title": "Політика Конфіденційності",
|
||||
"description": "Політика Конфіденційності та Умови Сервісу",
|
||||
"pp": "Повна Політика Конфіденційності"
|
||||
},
|
||||
"partials": {
|
||||
"sidebar": {
|
||||
"dash": "Панель Керування",
|
||||
"navbar": {
|
||||
"home": "Головна",
|
||||
"pages": {
|
||||
"manage": "Налаштування серверів",
|
||||
"settings": "Керувати",
|
||||
"commands": "Команди",
|
||||
"pp": "Політика Конфіденційності",
|
||||
"admin": "Адмін",
|
||||
"account": "Сторінки Аккаунта",
|
||||
"login": "Увійти",
|
||||
"logout": "Вийти"
|
||||
"admin": "Панель Адміністратора",
|
||||
"error": "Помилка",
|
||||
"credits": "Автори",
|
||||
"debug": "Налагодження",
|
||||
"leaderboard": "Таблиця Лідерів",
|
||||
"profile": "Профіль",
|
||||
"maintenance": "Технічне Обслуговування"
|
||||
}
|
||||
},
|
||||
"title": {
|
||||
"pages": {
|
||||
"manage": "Керувати Гілдіями",
|
||||
"settings": "Керувати",
|
||||
"commands": "Команди",
|
||||
"pp": "Політика Конфіденційності",
|
||||
"admin": "Панель Адміністратора",
|
||||
"error": "Помилка",
|
||||
"credits": "Автори",
|
||||
"debug": "Налагодження",
|
||||
"leaderboard": "Таблиця Лідерів",
|
||||
"profile": "Профіль",
|
||||
"maintenance": "Технічне Обслуговування"
|
||||
}
|
||||
},
|
||||
"sweetalert": {
|
||||
"success": {
|
||||
"login": "Вхід виконано."
|
||||
}
|
||||
},
|
||||
"preloader": {
|
||||
"text": "Завантаження..."
|
||||
},
|
||||
"premium": {
|
||||
"title": "Бажаєте більше від JaBa?",
|
||||
"description": "Ознайомтесь з преміум-функціями нижче!",
|
||||
"buttonText": "Стати Преміум"
|
||||
},
|
||||
"settings": {
|
||||
"title": "Налаштування Сайту",
|
||||
"description": "Налаштовувані параметри перегляду",
|
||||
"theme": {
|
||||
"title": "Тема",
|
||||
"description": "Зробіть сайт більш привабливим для своїх очей!"
|
||||
},
|
||||
"navbar": {
|
||||
"home": "Головна",
|
||||
"pages": {
|
||||
"manage": "Налаштування серверів",
|
||||
"settings": "Керувати",
|
||||
"commands": "Команди",
|
||||
"pp": "Політика Конфіденційності",
|
||||
"admin": "Панель Адміністратора",
|
||||
"error": "Помилка",
|
||||
"credits": "Автори",
|
||||
"debug": "Налагодження",
|
||||
"leaderboard": "Таблиця Лідерів",
|
||||
"profile": "Профіль",
|
||||
"maintenance": "Технічне Обслуговування"
|
||||
}
|
||||
},
|
||||
"title": {
|
||||
"pages": {
|
||||
"manage": "Керувати Гілдіями",
|
||||
"settings": "Керувати",
|
||||
"commands": "Команди",
|
||||
"pp": "Політика Конфіденційності",
|
||||
"admin": "Панель Адміністратора",
|
||||
"error": "Помилка",
|
||||
"credits": "Автори",
|
||||
"debug": "Налагодження",
|
||||
"leaderboard": "Таблиця Лідерів",
|
||||
"profile": "Профіль",
|
||||
"maintenance": "Технічне Обслуговування"
|
||||
}
|
||||
},
|
||||
"sweetalert": {
|
||||
"success": {
|
||||
"login": "Вхід виконано."
|
||||
}
|
||||
},
|
||||
"preloader": {
|
||||
"text": "Завантаження..."
|
||||
},
|
||||
"premium": {
|
||||
"title": "Бажаєте більше від JaBa?",
|
||||
"description": "Ознайомтесь з преміум-функціями нижче!",
|
||||
"buttonText": "Стати Преміум"
|
||||
},
|
||||
"settings": {
|
||||
"title": "Налаштування Сайту",
|
||||
"description": "Налаштовувані параметри перегляду",
|
||||
"theme": {
|
||||
"title": "Тема",
|
||||
"description": "Зробіть сайт більш привабливим для своїх очей!"
|
||||
},
|
||||
"language": {
|
||||
"title": "Мова",
|
||||
"description": "Виберіть бажану мову!"
|
||||
}
|
||||
"language": {
|
||||
"title": "Мова",
|
||||
"description": "Виберіть бажану мову!"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
4901
package-lock.json
generated
Normal file
4901
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
|
@ -23,6 +23,7 @@
|
|||
"discord-giveaways": "^6.0.1",
|
||||
"discord-player": "^6.5.0",
|
||||
"discord.js": "^14.11.0",
|
||||
"express-session": "^1.17.3",
|
||||
"gamedig": "^4.0.2",
|
||||
"i18next": "^21.9.1",
|
||||
"i18next-fs-backend": "^1.1.5",
|
||||
|
@ -30,7 +31,8 @@
|
|||
"moment": "^2.26.0",
|
||||
"mongoose": "^5.13.15",
|
||||
"ms": "^2.1.3",
|
||||
"play-dl": "^1.9.6"
|
||||
"play-dl": "^1.9.6",
|
||||
"session-file-store": "^1.5.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^8.23.0"
|
||||
|
|
|
@ -88,7 +88,7 @@ const checks = [
|
|||
if (!config.dashboard.enabled) {
|
||||
ignore("Dashboard is not enabled, skipping check.");
|
||||
} else {
|
||||
const checkPortTaken = (port) => {
|
||||
const checkPortTaken = port => {
|
||||
return new Promise(resolve => {
|
||||
const net = require("net");
|
||||
const tester = net.createServer()
|
||||
|
|
Loading…
Add table
Reference in a new issue