delete dashboard

This commit is contained in:
Jonny_Bro (Nikita) 2024-12-14 11:28:23 +05:00
parent b570759c09
commit fa3f71dd43
19 changed files with 3 additions and 1113 deletions

3
.gitignore vendored
View file

@ -13,6 +13,3 @@ Thumbs.db
# Node # Node
node_modules node_modules
# Dashboard DB
/json.sqlite

4
.gitmodules vendored
View file

@ -1,4 +0,0 @@
[submodule "dashboard/dashboard-core"]
path = dashboard/dashboard-core
url = https://git.jonnybro.ru/jonny_bro/dashboard-core
branch = main

View file

@ -14,7 +14,6 @@ JaBa offers:
* Slash and Context commands. * Slash and Context commands.
* Supports commands in DMs. * Supports commands in DMs.
* Localization support (any language; English, Russian and Ukrainian for now). * Localization support (any language; English, Russian and Ukrainian for now).
* Dashboard for changing various settings.
* Basic messages monitoring (updating and deletion). * Basic messages monitoring (updating and deletion).
## Commands ## Commands
@ -29,10 +28,6 @@ JaBa does many thing, here is **8 main categories**:
* **General**: `afk`, `avatar`, `boosters`, `minecraft`, `remindme`, `shorturl`, `serverinfo`, `userinfo`, `whois` and **7** more! * **General**: `afk`, `avatar`, `boosters`, `minecraft`, `remindme`, `shorturl`, `serverinfo`, `userinfo`, `whois` and **7** more!
* **Bot's owner commands**: `eval`, `servers`, `reload` and **2** more! * **Bot's owner commands**: `eval`, `servers`, `reload` and **2** more!
## *Kinda* Cool Dashboard
JaBa has it's own dashboard to change server's settings!
## Get The Bot ## Get The Bot
### Ready To Use ### Ready To Use
@ -53,7 +48,6 @@ Use [this instruction](https://github.com/JonnyBro/JaBa/wiki/Self-Hosting) to le
* [Full commands list](https://dash.jababot.ru/commands) * [Full commands list](https://dash.jababot.ru/commands)
* [Discord](https://discord.gg/Ptkj2n9nzZ) * [Discord](https://discord.gg/Ptkj2n9nzZ)
* [Github](https://github.com/JonnyBro/JaBa/) * [Github](https://github.com/JonnyBro/JaBa/)
* [Dashboard](https://dash.jababot.ru)
## Support ## Support
@ -63,7 +57,6 @@ If you want to contribute, feel free to fork this repo and making a pull request
## TODO ## TODO
* [ ] Refactor [tictactoe](./helpers/tictactoe.js). * [ ] Refactor [tictactoe](./helpers/tictactoe.js).
* [ ] Finish and release *dashboard-core* submodule.
## License ## License

View file

@ -26,7 +26,6 @@ class JaBaClient extends Client {
this.guildsData = require("../base/Guild"); this.guildsData = require("../base/Guild");
this.usersData = require("../base/User"); this.usersData = require("../base/User");
this.membersData = require("../base/Member"); this.membersData = require("../base/Member");
this.dashboard = require("../dashboard/dashboard");
this.databaseCache = {}; this.databaseCache = {};
this.databaseCache.users = new Collection(); this.databaseCache.users = new Collection();

View file

View file

@ -156,10 +156,6 @@ class Config extends BaseCommand {
`${interaction.translate("administration/config:TICKETLOGS")}: ${guildData.plugins?.tickets?.ticketLogs ? `<#${guildData.plugins?.tickets?.ticketLogs}>` : `*${interaction.translate("common:NOT_DEFINED")}*`}\n` + `${interaction.translate("administration/config:TICKETLOGS")}: ${guildData.plugins?.tickets?.ticketLogs ? `<#${guildData.plugins?.tickets?.ticketLogs}>` : `*${interaction.translate("common:NOT_DEFINED")}*`}\n` +
`${interaction.translate("administration/config:TRANSCRIPTIONLOGS")}: ${guildData.plugins?.tickets?.transcriptionLogs ? `<#${guildData.plugins?.tickets?.transcriptionLogs}>` : `*${interaction.translate("common:NOT_DEFINED")}*`}\n`, `${interaction.translate("administration/config:TRANSCRIPTIONLOGS")}: ${guildData.plugins?.tickets?.transcriptionLogs ? `<#${guildData.plugins?.tickets?.transcriptionLogs}>` : `*${interaction.translate("common:NOT_DEFINED")}*`}\n`,
}, },
{
name: interaction.translate("administration/config:DASHBOARD_TITLE"),
value: `[${interaction.translate("administration/config:DASHBOARD_CONTENT")}](${client.config.dashboard.domain})`,
},
], ],
}); });

View file

@ -91,7 +91,6 @@ class Stats extends BaseCommand {
{ {
name: client.customEmojis.link + " " + interaction.translate("general/stats:LINKS_TITLE"), name: client.customEmojis.link + " " + interaction.translate("general/stats:LINKS_TITLE"),
value: interaction.translate("misc:STATS_FOOTER", { value: interaction.translate("misc:STATS_FOOTER", {
dashboardLink: client.config.dashboard.domain,
supportLink: "https://discord.gg/Ptkj2n9nzZ", supportLink: "https://discord.gg/Ptkj2n9nzZ",
inviteLink: client.generateInvite({ scopes: ["bot", "applications.commands"], permissions: [PermissionsBitField.Flags.Administrator] }), inviteLink: client.generateInvite({ scopes: ["bot", "applications.commands"], permissions: [PermissionsBitField.Flags.Administrator] }),
owner: client.config.owner.id, owner: client.config.owner.id,

View file

@ -1,92 +0,0 @@
const { SlashCommandBuilder, PermissionsBitField, InteractionContextType, ApplicationIntegrationType } = require("discord.js"),
{ QueryType } = require("discord-player");
const BaseCommand = require("../../base/BaseCommand"),
fs = require("fs");
class Clips extends BaseCommand {
/**
*
* @param {import("../base/Client")} client
*/
constructor(client) {
super({
command: new SlashCommandBuilder()
.setName("clips")
.setDescription(client.translate("music/clips:DESCRIPTION"))
.setDescriptionLocalizations({
uk: client.translate("music/clips:DESCRIPTION", null, "uk-UA"),
ru: client.translate("music/clips:DESCRIPTION", null, "ru-RU"),
})
.setIntegrationTypes([ApplicationIntegrationType.GuildInstall])
.setContexts([InteractionContextType.Guild])
.addStringOption(option =>
option
.setName("query")
.setDescription(client.translate("music/clips:QUERY"))
.setDescriptionLocalizations({
uk: client.translate("music/clips:QUERY", null, "uk-UA"),
ru: client.translate("music/clips:QUERY", null, "ru-RU"),
})
.setRequired(true)
.setAutocomplete(true),
),
dirname: __dirname,
ownerOnly: false,
});
}
/**
*
* @param {import("../../base/Client")} client
* @param {import("discord.js").ChatInputCommandInteraction} interaction
*/
async execute(client, interaction) {
await interaction.deferReply();
const query = interaction.options.getString("query"),
voice = interaction.member.voice.channel;
if (!voice) return interaction.error("music/play:NO_VOICE_CHANNEL", null, { edit: true });
const perms = voice.permissionsFor(client.user);
if (!perms.has(PermissionsBitField.Flags.Connect) || !perms.has(PermissionsBitField.Flags.Speak)) return interaction.error("music/play:VOICE_CHANNEL_CONNECT", null, { edit: true });
client.player.play(interaction.member.voice.channel, query, {
nodeOptions: {
metadata: interaction,
},
searchEngine: QueryType.FILE,
selfDeaf: true,
leaveOnEnd: false,
leaveOnStop: true,
skipOnNoStream: true,
bufferingTimeout: 1000,
});
interaction.editReply({
content: interaction.translate("music/play:ADDED_QUEUE", {
songName: query.substring(8, query.length - 4),
}),
});
}
/**
*
* @param {import("../../base/Client")} client
* @param {import("discord.js").AutocompleteInteraction} interaction
* @returns
*/
async autocompleteRun(client, interaction) {
const query = interaction.options.getString("query"),
files = fs.readdirSync("./clips"),
results = files.filter(f => f.includes(query));
return await interaction.respond(
results.slice(0, 25).map(file => ({
name: file.substring(0, file.length - 4),
value: `./clips/${file}`,
})),
);
}
}
module.exports = Clips;

View file

@ -21,15 +21,6 @@ module.exports = {
logs: "123456789098765432", // The channel's ID for logs on the support server (when bot joins or leaves a guild) logs: "123456789098765432", // The channel's ID for logs on the support server (when bot joins or leaves a guild)
invite: "https://discord.gg/discord", // Invite link to the support server invite: "https://discord.gg/discord", // Invite link to the support server
}, },
/* Dashboard configuration */
dashboard: {
enabled: false, // Whether the dashboard is enabled or not
maintanceKey: "letmein", // Maintance key
port: 80, // Dashboard port
domain: "http://localhost", // The base URL of the dashboard without / at the end
secret: "XXXXXXXXXXXXXXXXXXXXXXXXXXXX", // Your Bot's Client Secret
logs: "123456789098765432", // The channel ID for logs
},
/* Embeds defaults */ /* Embeds defaults */
embed: { embed: {
color: "#00FF00", // Color color: "#00FF00", // Color

@ -1 +0,0 @@
Subproject commit 42cb44000f844f17b0d9e12e15a45ab60f3dcdb7

View file

@ -1,221 +0,0 @@
const SoftUI = require("./dashboard-core/theme/dbd-soft-ui"),
DBD = require("./dashboard-core/index"),
settings = require("./settings");
const { PermissionsBitField } = require("discord.js");
const locales = {
"en-US": require("../languages/en-US/dashboard.json"),
"ru-RU": require("../languages/ru-RU/dashboard.json"),
"uk-UA": require("../languages/uk-UA/dashboard.json"),
};
/**
*
* @param {import("../base/Client")} client
*/
module.exports.load = async client => {
const commands = client.commands.map(v => {
return {
commandName: v.command.name,
commandDescription: client.translate(`${v.category.toLowerCase()}/${v.command.name}:DESCRIPTION`),
commandUsage: client.translate(`${v.category.toLowerCase()}/${v.command.name}:USAGE`),
commandAlias: "",
_category: v.category,
};
});
let categories = [];
commands.forEach(c => {
if (!categories.includes(c._category)) categories.push(c._category);
});
categories = categories.map(c => {
return {
category: c,
categoryId: c.toLowerCase(),
subTitle: "",
hideAlias: true,
hideDescription: false,
hideSidebarItem: c === "Owner" || c === "IAT" ? true : false,
list: commands.filter(v => v._category === c),
};
});
const Dashboard = new DBD.Dashboard({
port: client.config.dashboard.port,
client: {
id: client.user.id,
secret: client.config.dashboard.secret,
},
cookiesSecret: client.config.dashboard.secret,
domain: client.config.dashboard.domain,
redirectUri: `${client.config.dashboard.domain}/discord/callback`,
bot: client,
ownerIDs: [client.config.owner.id],
requiredPermissions: PermissionsBitField.Flags.ViewChannel,
invite: {
clientId: client.user.id,
scopes: ["bot", "applications.commands"],
permissions: "8",
redirectUri: `${client.config.dashboard.domain}`,
},
supportServer: {
slash: "/support",
inviteUrl: client.config.support.invite,
},
rateLimits: {
manage: {
windowMs: 15 * 60 * 1000, // 15 minutes
max: 100, // Limit each IP to 100 requests per `window` (here, per 15 minutes)
message: "You are ratelimited!", // Message returned if user should be rate limited, could be also JSON/HTML
store: null, // <Rate Limiter Store> - if null, new MemoryStore()
// supported stores: https://www.npmjs.com/package/express-rate-limit#store
},
guildPage: {
windowMs: 15 * 60 * 1000,
max: 100,
message: "You are ratelimited!",
store: null,
},
settingsUpdatePostAPI: {
windowMs: 15 * 60 * 1000,
max: 100,
message: "You are ratelimited!",
store: null,
},
},
useTheme404: true,
useThemeMaintenance: true,
useUnderMaintenance: false,
underMaintenanceAccessKey: client.config.dashboard.maintanceKey,
underMaintenanceAccessPage: "/get-access",
underMaintenance: {
title: "Under Maintenance",
contentTitle: "This page is under maintenance",
texts: [
"<br>",
"We still want to change for the better for you.",
"Therefore, we are introducing technical updates so that we can allow you to enjoy the quality of our services.",
"<br>",
`Come back to us later or join our <a href="${client.config.support.invite}">Discord Support Server</a>`,
],
},
theme: SoftUI({
customThemeOptions: {
// eslint-disable-next-line no-unused-vars
index: async ({ req, res, config }) => {
const user = req.session?.user;
const username = (user?.discriminator === "0" ? user?.username : user?.tag) || "Guest";
let users = 0;
client.guilds.cache.forEach(g => {
users += g.memberCount;
});
const cards = [
{
title: "Current User",
icon: "single-02",
getValue: username,
},
{
title: "Playing music in this much servers",
icon: "settings-gear-65",
getValue: client.player.nodes.cache.size,
},
{
title: "Users Count",
icon: "favourite-28",
getValue: users,
},
{
title: "Servers Count",
icon: "notification-70",
getValue: `${client.guilds.cache.size - 1} out of 2000`,
progressBar: {
enabled: true,
getProgress: Math.round(((client.guilds.cache.size - 1) / 2000) * 100),
},
},
];
return {
values: [],
graph: {},
cards,
};
},
},
websiteName: `${client.user.username} Dashboard`,
colorScheme: "blue",
supporteMail: "",
icons: {
favicon: client.user.avatarURL(),
noGuildIcon: "https://pnggrid.com/wp-content/uploads/2021/05/Discord-Logo-Circle-1024x1024.png",
sidebar: {
darkUrl: client.user.avatarURL(),
lightUrl: client.user.avatarURL(),
hideName: false,
borderRadius: "1rem",
alignCenter: true,
},
},
index: {
card: {
category: "JaBa Bot",
title: "Simple bot made by <a href=\"https://github.com/JonnyBro\">Jonny_Bro</a>",
description: "JaBa's dashboard",
image: "",
link: {
enabled: false,
url: "https://github.com/JonnyBro",
},
},
graph: {
enabled: false,
lineGraph: true,
title: "Memory Usage",
tag: "Memory (MB)",
max: 100,
},
},
notify: {
errors: {
settingsSave: "Failed to save setttings",
},
success: {
settingsSave: "Successfully saved setttings.",
login: "Successfully logged in.",
logout: "Successfully logged out.",
},
},
preloader: {
image: "",
spinner: true,
text: "Page is loading",
},
commands: categories,
locales: {
enUS: locales["en-US"],
ruRU: locales["ru-RU"],
ukUA: locales["uk-UA"],
},
}),
customPages: [
DBD.customPagesTypes.redirectToUrl("/github", () => {
return "https://github.com/JonnyBro/JaBa";
}),
DBD.customPagesTypes.redirectToUrl("/updates", () => {
return "https://github.com/JonnyBro/JaBa/blob/main/dashboard/docs/updates.md";
}),
],
settings: settings(client),
});
await Dashboard.init().then(() => {
client.logger.ready(`Dashboard launched on port ${client.config.dashboard.port}`);
}).catch(err => {
client.logger.error(`Dashboard failed to initialize:\n${err}`);
});
};

View file

@ -1,459 +0,0 @@
const SoftUI = require("./dashboard-core/theme/dbd-soft-ui"),
DBD = require("./dashboard-core/index");
const { PermissionsBitField, ChannelType } = require("discord.js");
module.exports = client => [
{
categoryId: "main",
categoryName: "Main settings",
categoryDescription: "Setup your bot here!",
categoryPermissions: PermissionsBitField.Flags.ManageGuild,
categoryOptionsList: [
{
optionId: "lang",
optionName: "Language",
optionDescription: "Change bot's language on the server",
optionType: DBD.formTypes.select({
English: "en-US",
Russian: "ru-RU",
Ukrainian: "uk-UA",
}),
getActualSet: async ({ guild }) => {
const guildData = await client.getGuildData(guild.id);
return guildData.language;
},
setNew: async ({ guild, newData }) => {
const guildData = await client.getGuildData(guild.id);
guildData.language = newData;
await guildData.save();
return;
},
},
{
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.getGuildData(guild.id);
return guildData.plugins.welcome.enabled;
},
setNew: async ({ guild, newData }) => {
const guildData = await client.getGuildData(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.getGuildData(guild.id);
return guildData.plugins.welcome.withImage;
},
setNew: async ({ guild, newData }) => {
const guildData = await client.getGuildData(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.getGuildData(guild.id);
return guildData.plugins.welcome.message;
},
setNew: async ({ guild, newData }) => {
const guildData = await client.getGuildData(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.getGuildData(guild.id);
return guildData.plugins.welcome.channel;
},
setNew: async ({ guild, newData }) => {
const guildData = await client.getGuildData(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.getGuildData(guild.id);
return guildData.plugins.goodbye.enabled;
},
setNew: async ({ guild, newData }) => {
const guildData = await client.getGuildData(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.getGuildData(guild.id);
return guildData.plugins.goodbye.withImage;
},
setNew: async ({ guild, newData }) => {
const guildData = await client.getGuildData(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.getGuildData(guild.id);
return guildData.plugins.goodbye.message;
},
setNew: async ({ guild, newData }) => {
const guildData = await client.getGuildData(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.getGuildData(guild.id);
return guildData.plugins.goodbye.channel;
},
setNew: async ({ guild, newData }) => {
const guildData = await client.getGuildData(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.getGuildData(guild.id);
return guildData.plugins.autorole.enabled;
},
setNew: async ({ guild, newData }) => {
const guildData = await client.getGuildData(guild.id);
guildData.plugins.autorole.enabled = newData;
await guildData.save();
return;
},
},
{
optionId: "autorole_role",
optionName: "Role",
optionDescription: "Select a role for auto role. Select \"-\" to disable",
optionType: DBD.formTypes.rolesSelect(false, false, true),
getActualSet: async ({ guild }) => {
const guildData = await client.getGuildData(guild.id);
return guildData.plugins.autorole.role;
},
setNew: async ({ guild, newData }) => {
const guildData = await client.getGuildData(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. It will remove invite links from non-moderators",
optionType: DBD.formTypes.switch(),
getActualSet: async ({ guild }) => {
const guildData = await client.getGuildData(guild.id);
return guildData.plugins.automod.enabled;
},
setNew: async ({ guild, newData }) => {
const guildData = await client.getGuildData(guild.id);
guildData.plugins.automod.enabled = newData;
await guildData.save();
return;
},
},
{
optionId: "automod_ignore",
optionName: "Ignore Channels",
optionDescription: "Select a channels for auto mod to ignore",
optionType: DBD.formTypes.channelsMultiSelect(false, false, [ChannelType.GuildText]),
getActualSet: async ({ guild }) => {
const guildData = await client.getGuildData(guild.id);
return guildData.plugins.automod.ignored;
},
setNew: async ({ guild, newData }) => {
const guildData = await client.getGuildData(guild.id);
guildData.plugins.automod.ignored = newData;
await guildData.save();
return;
},
},
]),
},
{
optionId: "monitoring",
optionName: "Monitoring Channels",
optionDescription: "Setup monitoring channels on the server",
optionType: SoftUI.formTypes.multiRow([
{
optionId: "monitoring_messageupdate",
optionName: "Message Update Channel",
optionDescription: "Select a channel for messages update logs to go to. Select \"-\" to disable",
optionType: DBD.formTypes.channelsSelect(false, [ChannelType.GuildText]),
getActualSet: async ({ guild }) => {
const guildData = await client.getGuildData(guild.id);
return guildData.plugins?.monitoring?.messageUpdate;
},
setNew: async ({ guild, newData }) => {
const guildData = await client.getGuildData(guild.id);
if (guildData.plugins.monitoring === undefined) guildData.plugins.monitoring = {};
guildData.plugins.monitoring.messageUpdate = newData !== "" ? newData : null;
await guildData.save();
return;
},
},
{
optionId: "monitoring_messagedelete",
optionName: "Message Deletion Channel",
optionDescription: "Select a channel for messages deletion logs to go to. Select \"-\" to disable",
optionType: DBD.formTypes.channelsSelect(false, [ChannelType.GuildText]),
getActualSet: async ({ guild }) => {
const guildData = await client.getGuildData(guild.id);
return guildData.plugins?.monitoring?.messageDelete;
},
setNew: async ({ guild, newData }) => {
const guildData = await client.getGuildData(guild.id);
if (guildData.plugins.monitoring === undefined) guildData.plugins.monitoring = {};
guildData.plugins.monitoring.messageDelete = newData !== "" ? newData : null;
await guildData.save();
return;
},
},
]),
},
{
optionId: "channels",
optionName: "Special Channels",
optionDescription: "Setup special channels on the server. Select \"-\" to disable",
optionType: SoftUI.formTypes.multiRow([
{
optionId: "channels_suggestions",
optionName: "Suggestions Channel",
optionDescription: "Select a channel for suggestions to go to",
optionType: DBD.formTypes.channelsSelect(false, [ChannelType.GuildText]),
getActualSet: async ({ guild }) => {
const guildData = await client.getGuildData(guild.id);
return guildData.plugins.suggestions;
},
setNew: async ({ guild, newData }) => {
const guildData = await client.getGuildData(guild.id);
guildData.plugins.suggestions = newData !== "" ? newData : null;
await guildData.save();
return;
},
},
{
optionId: "channels_reports",
optionName: "Reports Channel",
optionDescription: "Select a channel for reports to go to. Select \"-\" to disable",
optionType: DBD.formTypes.channelsSelect(false, [ChannelType.GuildText]),
getActualSet: async ({ guild }) => {
const guildData = await client.getGuildData(guild.id);
return guildData.plugins.reports;
},
setNew: async ({ guild, newData }) => {
const guildData = await client.getGuildData(guild.id);
guildData.plugins.reports = newData !== "" ? newData : null;
await guildData.save();
return;
},
},
{
optionId: "channels_birthdays",
optionName: "Birthdays Channel",
optionDescription: "Select a channel for birthdays message to go to. Select \"-\" to disable",
optionType: DBD.formTypes.channelsSelect(false, [ChannelType.GuildText]),
getActualSet: async ({ guild }) => {
const guildData = await client.getGuildData(guild.id);
return guildData.plugins.birthdays;
},
setNew: async ({ guild, newData }) => {
const guildData = await client.getGuildData(guild.id);
guildData.plugins.birthdays = newData !== "" ? newData : null;
await guildData.save();
return;
},
},
{
optionId: "channels_modlogs",
optionName: "Moderation Logs Channel",
optionDescription: "Select a channel for moderation logs to go to (warns). Select \"-\" to disable",
optionType: DBD.formTypes.channelsSelect(false, [ChannelType.GuildText]),
getActualSet: async ({ guild }) => {
const guildData = await client.getGuildData(guild.id);
return guildData.plugins.modlogs;
},
setNew: async ({ guild, newData }) => {
const guildData = await client.getGuildData(guild.id);
guildData.plugins.modlogs = newData !== "" ? newData : null;
await guildData.save();
return;
},
},
]),
},
],
},
{
categoryId: "test",
categoryName: "test settings",
categoryDescription: "ooga booga",
categoryPermissions: PermissionsBitField.Flags.ViewChannel,
categoryOptionsList: [
{
optionType: DBD.formTypes.embedBuilder({
username: "JaBa",
avatarURL: "https://cdn.discordapp.com/avatars/708637495054565426/af98d49ebc9bf28b40b45ed5a0a623b4.png?size=4096",
}),
},
],
},
];

View file

@ -28,8 +28,6 @@ class Ready extends BaseEvent {
const checkReminds = require("../helpers/checkReminds"); const checkReminds = require("../helpers/checkReminds");
checkReminds.init(client); checkReminds.init(client);
if (client.config.dashboard.enabled) await client.dashboard.load(client);
client.logger.ready(`Loaded a total of ${commands.length} command(s).`); client.logger.ready(`Loaded a total of ${commands.length} command(s).`);
client.logger.ready(`${client.user.getUsername()}, ready to serve ${users} members in ${servers} servers.`); client.logger.ready(`${client.user.getUsername()}, ready to serve ${users} members in ${servers} servers.`);
console.timeEnd("botReady"); console.timeEnd("botReady");

View file

@ -1,102 +0,0 @@
{
"name": "English",
"index": {
"feeds": [ "Current User", "Playing music in this much servers", "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"
},
"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"
},
"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"
}
},
"notify": {
"errors": {
"settingsSave": "Failed to save setttings"
},
"success": {
"settingsSave": "Successfully saved setttings.",
"login": "Successfully logged in.",
"logout": "Successfully logged out."
}
},
"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!"
}
}
}
}

View file

@ -15,7 +15,7 @@
"OPTION_NAN_ALL": "Please specify an integer greater than 0 or `all`.", "OPTION_NAN_ALL": "Please specify an integer greater than 0 or `all`.",
"OWNER_ONLY": "Only the bot owner can use this command.", "OWNER_ONLY": "Only the bot owner can use this command.",
"SELECT_CANCELED": "Selection canceled.", "SELECT_CANCELED": "Selection canceled.",
"STATS_FOOTER": "● [Dashboard]({{dashboardLink}})\n● [Support Server]({{supportLink}})\n● [Invite JaBa to Your Server]({{inviteLink}})", "STATS_FOOTER": "● [Support Server]({{supportLink}})\n● [Invite JaBa to Your Server]({{inviteLink}})",
"TIMED_OUT": "Time out.", "TIMED_OUT": "Time out.",
"JUMP_TO_PAGE": "Specify the page you want to jump to (maximum **{{length}}**):", "JUMP_TO_PAGE": "Specify the page you want to jump to (maximum **{{length}}**):",
"QUOTE_TITLE": "Message from {{user}}", "QUOTE_TITLE": "Message from {{user}}",

View file

@ -1,102 +0,0 @@
{
"name": "Русский",
"index": {
"feeds": [ "Текущий пользователь", "Играю музыку в стольких серверах", "Кол-во пользователей", "Кол-во серверов" ],
"card": {
"category": "JaBa Bot",
"title": "Простой бот, созданный <a href=\"https://github.com/JonnyBro\">Jonny_Bro</a>",
"description": "Верхний текст",
"image": "",
"footer": "Нижний текст"
},
"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": "Техобслуживание"
}
},
"title": {
"pages": {
"manage": "Настройки серверов",
"settings": "Настройки",
"commands": "Команды",
"pp": "Политика конфиденциальности",
"admin": "Админ панель",
"error": "Ошибка",
"credits": "Разработчики панели",
"debug": "Отладка",
"leaderboard": "Таблица лидеров",
"profile": "Профиль",
"maintenance": "Техобслуживание"
}
},
"notify": {
"errors": {
"settingsSave": "Произошла ошибка при сохранении настроек."
},
"success": {
"settingsSave": "Настройки успешно сохранены.",
"login": "Вход успешно выполнен.",
"logout": "Выход успешно выполнен."
}
},
"preloader": {
"text": "Загрузка..."
},
"premium": {
"title": "Хотите большего JaBa?",
"description": "Проверьте Премиум функции!",
"buttonText": "Стать Премиум"
},
"settings": {
"title": "Настройки сайта",
"description": "Настройте параметры панели управления",
"theme": {
"title": "Тема",
"description": "У нас есть тёмная и светлая!"
},
"language": {
"title": "Язык",
"description": "Выберите предпочитаемый язык!"
}
}
}
}

View file

@ -15,7 +15,7 @@
"OPTION_NAN_ALL": "Укажите целое число больше 0 или `all`", "OPTION_NAN_ALL": "Укажите целое число больше 0 или `all`",
"OWNER_ONLY": "Данную команду может использовать только владелец бота", "OWNER_ONLY": "Данную команду может использовать только владелец бота",
"SELECT_CANCELED": "Выбор отменён", "SELECT_CANCELED": "Выбор отменён",
"STATS_FOOTER": "● [Панель управления]({{dashboardLink}})\n● [Сервер поддержки]({{supportLink}})\n● [Пригласить JaBa на свой сервер]({{inviteLink}})", "STATS_FOOTER": "● [Сервер поддержки]({{supportLink}})\n● [Пригласить JaBa на свой сервер]({{inviteLink}})",
"TIMED_OUT": "Время вышло", "TIMED_OUT": "Время вышло",
"JUMP_TO_PAGE": "Укажите страницу к которой хотите перейти (максимум **{{length}}**):", "JUMP_TO_PAGE": "Укажите страницу к которой хотите перейти (максимум **{{length}}**):",
"QUOTE_TITLE": "Сообщение от {{user}}", "QUOTE_TITLE": "Сообщение от {{user}}",

View file

@ -1,102 +0,0 @@
{
"name": "Українська",
"index": {
"feeds": [ "Поточний Користувач", "Играю музыку в стольких серверах", "Кількість користувачів", "Кількість серверів" ],
"card": {
"category": "JaBa Бот",
"title": "Простий бот, створений <a href=\"https://github.com/JonnyBro\">Jonny_Bro</a>",
"description": "Верхній Текст",
"image": "",
"footer": "Нижній Текст"
},
"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": "Технічне Обслуговування"
}
},
"title": {
"pages": {
"manage": "Керувати Гілдіями",
"settings": "Керувати",
"commands": "Команди",
"pp": "Політика Конфіденційності",
"admin": "Панель Адміністратора",
"error": "Помилка",
"credits": "Автори",
"debug": "Налагодження",
"leaderboard": "Таблиця Лідерів",
"profile": "Профіль",
"maintenance": "Технічне Обслуговування"
}
},
"notify": {
"errors": {
"settingsSave": "Сталася помилка при збереженні налаштувань."
},
"success": {
"settingsSave": "Налаштування успішно збережені.",
"login": "Успішний вхід.",
"logout": "Успішний вихід."
}
},
"preloader": {
"text": "Завантаження..."
},
"premium": {
"title": "Бажаєте більше від JaBa?",
"description": "Ознайомтесь з преміум-функціями нижче!",
"buttonText": "Стати Преміум"
},
"settings": {
"title": "Налаштування Сайту",
"description": "Налаштовувані параметри перегляду",
"theme": {
"title": "Тема",
"description": "Зробіть сайт більш привабливим для своїх очей!"
},
"language": {
"title": "Мова",
"description": "Виберіть бажану мову!"
}
}
}
}

View file

@ -15,7 +15,7 @@
"OPTION_NAN_ALL": "Вкажіть ціле число більше 0 або `all`", "OPTION_NAN_ALL": "Вкажіть ціле число більше 0 або `all`",
"OWNER_ONLY": "Цю команду може використовувати тільки власник бота", "OWNER_ONLY": "Цю команду може використовувати тільки власник бота",
"SELECT_CANCELED": "Вибір скасовано", "SELECT_CANCELED": "Вибір скасовано",
"STATS_FOOTER": "● [Панель керування]({{dashboardLink}})\n● [Сервер підтримки]({{supportLink}})\n● [Запросити JaBa на свій сервер]({{inviteLink}})", "STATS_FOOTER": "● [Сервер підтримки]({{supportLink}})\n● [Запросити JaBa на свій сервер]({{inviteLink}})",
"TIMED_OUT": "Час вийшов", "TIMED_OUT": "Час вийшов",
"JUMP_TO_PAGE": "Вкажіть сторінку, до якої хочете перейти (максимум **{{length}}**):", "JUMP_TO_PAGE": "Вкажіть сторінку, до якої хочете перейти (максимум **{{length}}**):",
"QUOTE_TITLE": "Повідомлення від {{user}}", "QUOTE_TITLE": "Повідомлення від {{user}}",