something something

This commit is contained in:
JonnyBro 2021-12-24 20:52:27 +05:00
parent 1d09ed6618
commit b496e28a7f
37 changed files with 113 additions and 112 deletions

View file

@ -51,7 +51,7 @@ class Setfortniteshop extends Command {
const attachment = new Discord.MessageAttachment(image, "shop.png"); const attachment = new Discord.MessageAttachment(image, "shop.png");
const embed = new Discord.MessageEmbed() const embed = new Discord.MessageEmbed()
.setAuthor(this.client.translate("general/fortniteshop:DATE", { date: this.client.printDate(new Date(Date.now()), null, message.guild.data.language) }, message.guild.data.language), this.client.user.displayAvatarURL({ size: 512, dynamic: true, format: 'png' })) .setAuthor(this.client.translate("general/fortniteshop:DATE", { date: this.client.printDate(new Date(Date.now()), null, message.guild.data.language) }, message.guild.data.language), this.client.user.displayAvatarURL({ size: 512, dynamic: true, format: "png" }))
.attachFiles(attachment) .attachFiles(attachment)
.setImage("attachment://shop.png") .setImage("attachment://shop.png")
.setColor(this.client.config.embed.color) .setColor(this.client.config.embed.color)

View file

@ -43,7 +43,7 @@ class Credits extends Command {
const embed = new Discord.MessageEmbed() const embed = new Discord.MessageEmbed()
.setAuthor(message.translate("economy/money:TITLE", { .setAuthor(message.translate("economy/money:TITLE", {
username: member.user.username username: member.user.username
}), member.user.displayAvatarURL({ size: 512, dynamic: true, format: 'png' })) }), member.user.displayAvatarURL({ size: 512, dynamic: true, format: "png" }))
.addField(message.translate("economy/profile:CASH"), message.translate("economy/profile:MONEY", { .addField(message.translate("economy/profile:CASH"), message.translate("economy/profile:MONEY", {
money: memberData.money money: memberData.money
}), true) }), true)

View file

@ -51,7 +51,7 @@ class Profile extends Command {
const profileEmbed = new Discord.MessageEmbed() const profileEmbed = new Discord.MessageEmbed()
.setAuthor(message.translate("economy/profile:TITLE", { .setAuthor(message.translate("economy/profile:TITLE", {
username: member.user.tag username: member.user.tag
}), member.user.displayAvatarURL({ size: 512, dynamic: true, format: 'png' })) }), member.user.displayAvatarURL({ size: 512, dynamic: true, format: "png" }))
.attachFiles([{ attachment: await userData.getAchievements(), name: "achievements.png" }]) .attachFiles([{ attachment: await userData.getAchievements(), name: "achievements.png" }])
.setImage("attachment://achievements.png") .setImage("attachment://achievements.png")
.setDescription(userData.bio ? userData.bio : message.translate("economy/profile:NO_BIO")) .setDescription(userData.bio ? userData.bio : message.translate("economy/profile:NO_BIO"))

View file

@ -38,7 +38,7 @@ class Work extends Command {
await data.memberData.save(); await data.memberData.save();
const embed = new Discord.MessageEmbed() const embed = new Discord.MessageEmbed()
.setFooter(message.translate("economy/work:AWARD"), message.author.displayAvatarURL({ size: 512, dynamic: true, format: 'png' })) .setFooter(message.translate("economy/work:AWARD"), message.author.displayAvatarURL({ size: 512, dynamic: true, format: "png" }))
.setColor(data.config.embed.color); .setColor(data.config.embed.color);
const award = [ const award = [

View file

@ -94,7 +94,7 @@ class FindWords extends Command {
winner: user.username, winner: user.username,
duration: time, duration: time,
participantCount: participants.length, participantCount: participants.length,
participantList: participants.map((p) => "<@"+p+">").join("\n") participantList: participants.map((p) => `<@${p}>`).join("\n")
}); });
if (participants.length > 1 && data.guild.disabledCategories && !data.guild.disabledCategories.includes("Economy")) { if (participants.length > 1 && data.guild.disabledCategories && !data.guild.disabledCategories.includes("Economy")) {
message.sendT("fun/findwords:CREDITS", { winner: user.username }); message.sendT("fun/findwords:CREDITS", { winner: user.username });

View file

@ -37,7 +37,7 @@ class Fortniteshop extends Command {
const attachment = new Discord.MessageAttachment(image, "shop.png"); const attachment = new Discord.MessageAttachment(image, "shop.png");
const embed = new Discord.MessageEmbed() const embed = new Discord.MessageEmbed()
.setAuthor(message.translate("general/fortniteshop:HEADER", { date: message.printDate(new Date(Date.now())) }), this.client.user.displayAvatarURL({ size: 512, dynamic: true, format: 'png' })) .setAuthor(message.translate("general/fortniteshop:HEADER", { date: message.printDate(new Date(Date.now())) }), this.client.user.displayAvatarURL({ size: 512, dynamic: true, format: "png" }))
.attachFiles(attachment) .attachFiles(attachment)
.setImage("attachment://shop.png") .setImage("attachment://shop.png")
.setColor(this.client.config.embed.color) .setColor(this.client.config.embed.color)

View file

@ -23,12 +23,12 @@ class Github extends Command {
const json = await res.json(); const json = await res.json();
const embed = new Discord.MessageEmbed() const embed = new Discord.MessageEmbed()
.setAuthor(this.client.user.tag, this.client.user.displayAvatarURL({ size: 512, dynamic: true, format: 'png' })) .setAuthor(this.client.user.tag, this.client.user.displayAvatarURL({ size: 512, dynamic: true, format: "png" }))
.setDescription("["+message.translate("general/github:CLICK_HERE")+"](https://github.com/JonnyBro/JaBa-new)") .setDescription(`[${message.translate("general/github:CLICK_HERE")}](https://github.com/JonnyBro/JaBa-new)`)
.addField("Stars", json.stargazers_count, true) .addField("Stars", json.stargazers_count, true)
.addField("Forks", json.forks_count, true) .addField("Forks", json.forks_count, true)
.addField(message.translate("general/github:LANGUAGE"), json.language, true) .addField(message.translate("general/github:LANGUAGE"), json.language, true)
.addField(message.translate("general/github:OWNER"), "["+json.owner.login+"]("+json.owner.html_url+")") .addField(message.translate("general/github:OWNER"), `[${json.owner.login}](${json.owner.html_url})`)
.setImage(json.owner.avatar_url) .setImage(json.owner.avatar_url)
.setColor(data.config.embed.color) .setColor(data.config.embed.color)
.setFooter(data.config.embed.footer); .setFooter(data.config.embed.footer);

View file

@ -41,7 +41,7 @@ class Help extends Command {
.addField(message.translate("general/help:FIELD_USAGE"), usage) .addField(message.translate("general/help:FIELD_USAGE"), usage)
.addField(message.translate("general/help:FIELD_EXAMPLES"), examples) .addField(message.translate("general/help:FIELD_EXAMPLES"), examples)
.addField(message.translate("general/help:FIELD_ALIASES"), cmd.help.aliases.length > 0 ? cmd.help.aliases.map(a => "`" + a + "`").join("\n") : message.translate("general/help:NO_ALIAS")) .addField(message.translate("general/help:FIELD_ALIASES"), cmd.help.aliases.length > 0 ? cmd.help.aliases.map(a => "`" + a + "`").join("\n") : message.translate("general/help:NO_ALIAS"))
.addField(message.translate("general/help:FIELD_PERMISSIONS"), cmd.conf.memberPermissions.length > 0 ? cmd.conf.memberPermissions.map((p) => "`"+p+"`").join("\n") : message.translate("general/help:NO_REQUIRED_PERMISSION")) .addField(message.translate("general/help:FIELD_PERMISSIONS"), cmd.conf.memberPermissions.length > 0 ? cmd.conf.memberPermissions.map((p) => `\`${p}\``).join("\n") : message.translate("general/help:NO_REQUIRED_PERMISSION"))
.setColor(this.client.config.embed.color) .setColor(this.client.config.embed.color)
.setFooter(this.client.config.embed.footer); .setFooter(this.client.config.embed.footer);
@ -70,7 +70,7 @@ class Help extends Command {
embed.addField(`${emojis.categories[cat.toLowerCase()]} ${cat} - (${tCommands.size})`, `${tCommands.map((cmd) => `${cmd.help.name}`).join(", ")}`); embed.addField(`${emojis.categories[cat.toLowerCase()]} ${cat} - (${tCommands.size})`, `${tCommands.map((cmd) => `${cmd.help.name}`).join(", ")}`);
}); });
if (message.guild) { if (message.guild) {
if (data.guild.customCommands.length > 0) embed.addField(emojis.categories.custom+" "+message.guild.name+" | "+message.translate("general/help:CUSTOM_COMMANDS")+" - ("+data.guild.customCommands.length+")", data.guild.customCommands.map((cmd) => "`"+cmd.name+"`").join(", ")); if (data.guild.customCommands.length > 0) embed.addField(`${emojis.categories.custom} ${message.guild.name} | ${message.translate("general/help:CUSTOM_COMMANDS")} - (${data.guild.customCommands.length})`, data.guild.customCommands.map((cmd) => `\`${cmd.name}\``).join(", "));
}; };
embed.addField("\u200B", message.translate("misc:STATS_FOOTER", { embed.addField("\u200B", message.translate("misc:STATS_FOOTER", {
@ -78,7 +78,7 @@ class Help extends Command {
donateLink: "https://qiwi.com/n/JONNYBRO", donateLink: "https://qiwi.com/n/JONNYBRO",
owner: this.client.config.owner.id owner: this.client.config.owner.id
})); }));
embed.setAuthor(message.translate("general/help:TITLE", { name: this.client.user.username }), this.client.user.displayAvatarURL({ size: 512, dynamic: true, format: 'png' })); embed.setAuthor(message.translate("general/help:TITLE", { name: this.client.user.username }), this.client.user.displayAvatarURL({ size: 512, dynamic: true, format: "png" }));
return message.channel.send(embed); return message.channel.send(embed);
} }
}; };

View file

@ -60,7 +60,7 @@ class Minecraft extends Command {
if (!json) return m.error("general/minecraft:FAILED", null, { edit: true }); if (!json) return m.error("general/minecraft:FAILED", null, { edit: true });
const imgRes = await fetch("https://www.minecraftskinstealer.com/achievement/a.php?i=2&h=Success&t="+ip); const imgRes = await fetch(`https://www.minecraftskinstealer.com/achievement/a.php?i=2&h=Success&t=${ip}`);
const imgAttachment = new Discord.MessageAttachment(await imgRes.buffer(), "success.png"); const imgAttachment = new Discord.MessageAttachment(await imgRes.buffer(), "success.png");
const mcEmbed = new Discord.MessageEmbed() const mcEmbed = new Discord.MessageEmbed()

View file

@ -20,7 +20,7 @@ class Permissions extends Command {
async run (message) { async run (message) {
const member = message.mentions.members.first() || message.member; const member = message.mentions.members.first() || message.member;
let text = "```\n"+message.translate("general/permissions:TITLE", { user: member.user.username, channel: message.channel.name })+"\n\n"; let text = "```\n" + `${message.translate("general/permissions:TITLE", { user: member.user.username, channel: message.channel.name })}\n\n`;
const mPermissions = message.channel.permissionsFor(member); const mPermissions = message.channel.permissionsFor(member);
const total = { const total = {
denied: 0, denied: 0,

View file

@ -20,7 +20,7 @@ class Quote extends Command {
async run (message, args, data) { async run (message, args, data) {
function embed(m) { function embed(m) {
const embed = new Discord.MessageEmbed() const embed = new Discord.MessageEmbed()
.setAuthor(m.author.tag, m.author.displayAvatarURL({ size: 512, dynamic: true, format: 'png' })) .setAuthor(m.author.tag, m.author.displayAvatarURL({ size: 512, dynamic: true, format: "png" }))
.setDescription(m.content) .setDescription(m.content)
.setColor(m.member ? m.member.roles.highest ? m.member.roles.highest.color : data.config.embed.color : data.config.embed.color) .setColor(m.member ? m.member.roles.highest ? m.member.roles.highest.color : data.config.embed.color : data.config.embed.color)
.setFooter(m.guild.name + " | #" + m.channel.name) .setFooter(m.guild.name + " | #" + m.channel.name)

View file

@ -29,10 +29,10 @@ class Report extends Command {
if (!rep) return message.error("general/report:MISSING_REASON"); if (!rep) return message.error("general/report:MISSING_REASON");
const embed = new Discord.MessageEmbed() const embed = new Discord.MessageEmbed()
.setAuthor(message.translate("general/report:TITLE", { user: member.user.tag }), message.author.displayAvatarURL({ size: 512, dynamic: true, format: 'png' })) .setAuthor(message.translate("general/report:TITLE", { user: member.user.tag }), message.author.displayAvatarURL({ size: 512, dynamic: true, format: "png" }))
.addField(message.translate("common:AUTHOR"), message.author.tag, true) .addField(message.translate("common:AUTHOR"), message.author.tag, true)
.addField(message.translate("common:DATE"), message.printDate(new Date(Date.now())), true) .addField(message.translate("common:DATE"), message.printDate(new Date(Date.now())), true)
.addField(message.translate("common:REASON"), "**"+rep+"**", true) .addField(message.translate("common:REASON"), `**${rep}**`, true)
.addField(message.translate("common:USER"), `\`${member.user.tag}\` (${member.user.toString()})`, true) .addField(message.translate("common:USER"), `\`${member.user.tag}\` (${member.user.toString()})`, true)
.setColor(data.config.embed.color) .setColor(data.config.embed.color)
.setFooter(data.config.embed.footer); .setFooter(data.config.embed.footer);

View file

@ -24,7 +24,7 @@ class Someone extends Command {
.addField(message.translate("common:USERNAME"), member.user.username, true) .addField(message.translate("common:USERNAME"), member.user.username, true)
.addField(message.translate("common:DISCRIMINATOR"), member.user.discriminator, true) .addField(message.translate("common:DISCRIMINATOR"), member.user.discriminator, true)
.addField(message.translate("common:ID"), member.user.id, true) .addField(message.translate("common:ID"), member.user.id, true)
.setThumbnail(member.user.displayAvatarURL({ size: 512, dynamic: true, format: 'png' })) .setThumbnail(member.user.displayAvatarURL({ size: 512, dynamic: true, format: "png" }))
.setColor(data.config.embed.color); .setColor(data.config.embed.color);
message.channel.send(embed); message.channel.send(embed);
} }

View file

@ -25,10 +25,10 @@ class Suggest extends Command {
if (!sugg) return message.error("general/suggest:MISSING_CONTENT"); if (!sugg) return message.error("general/suggest:MISSING_CONTENT");
const embed = new Discord.MessageEmbed() const embed = new Discord.MessageEmbed()
.setAuthor(message.translate("general/suggest:TITLE", { user: message.author.username }), message.author.displayAvatarURL({ size: 512, dynamic: true, format: 'png' })) .setAuthor(message.translate("general/suggest:TITLE", { user: message.author.username }), message.author.displayAvatarURL({ size: 512, dynamic: true, format: "png" }))
.addField(message.translate("common:AUTHOR"), `\`${message.author.username}#${message.author.discriminator}\``, true) .addField(message.translate("common:AUTHOR"), `\`${message.author.username}#${message.author.discriminator}\``, true)
.addField(message.translate("common:DATE"), message.printDate(new Date(Date.now())), true) .addField(message.translate("common:DATE"), message.printDate(new Date(Date.now())), true)
.addField(message.translate("common:CONTENT"), "**"+sugg+"**") .addField(message.translate("common:CONTENT"), sugg)
.setColor(data.config.embed.color) .setColor(data.config.embed.color)
.setFooter(data.config.embed.footer); .setFooter(data.config.embed.footer);

View file

@ -47,7 +47,7 @@ class Translate extends Command {
const translated = await translate(toTranslate, { to: language }); const translated = await translate(toTranslate, { to: language });
const resEmbed = new Discord.MessageEmbed() const resEmbed = new Discord.MessageEmbed()
.setAuthor("Translator", this.client.user.displayAvatarURL({ size: 512, dynamic: true, format: 'png' })) .setAuthor("Translator", this.client.user.displayAvatarURL({ size: 512, dynamic: true, format: "png" }))
.addField(translated.from.language.iso, "```" + toTranslate + "```") .addField(translated.from.language.iso, "```" + toTranslate + "```")
.addField(language, "```" + translated.text + "```") .addField(language, "```" + translated.text + "```")
.setColor(data.config.embed.color) .setColor(data.config.embed.color)

View file

@ -41,13 +41,13 @@ class Userinfo extends Command {
if (message.guild) member = await message.guild.members.fetch(user).catch(() => {}); if (message.guild) member = await message.guild.members.fetch(user).catch(() => {});
const embed = new Discord.MessageEmbed() const embed = new Discord.MessageEmbed()
.setAuthor(user.tag, user.displayAvatarURL({ size: 512, dynamic: true, format: 'png' })) .setAuthor(user.tag, user.displayAvatarURL({ size: 512, dynamic: true, format: "png" }))
.setThumbnail(user.displayAvatarURL({ dynamic: true })) .setThumbnail(user.displayAvatarURL({ dynamic: true }))
.addField(":man: " + message.translate("common:USERNAME"), user.username, true) .addField(":man: " + message.translate("common:USERNAME"), user.username, true)
.addField(this.client.customEmojis.discriminator + " " + message.translate("common:DISCRIMINATOR"), user.discriminator, true) .addField(this.client.customEmojis.discriminator + " " + message.translate("common:DISCRIMINATOR"), user.discriminator, true)
.addField(this.client.customEmojis.bot + " " + message.translate("common:ROBOT"), (user.bot ? message.translate("common:YES") : message.translate("common:NO")), true) .addField(this.client.customEmojis.bot + " " + message.translate("common:ROBOT"), (user.bot ? message.translate("common:YES") : message.translate("common:NO")), true)
.addField(this.client.customEmojis.calendar + " " + message.translate("common:CREATION"), message.printDate(user.createdAt), true) .addField(this.client.customEmojis.calendar + " " + message.translate("common:CREATION"), message.printDate(user.createdAt), true)
.addField(this.client.customEmojis.avatar+" "+message.translate("common:AVATAR"), user.displayAvatarURL({ size: 512, dynamic: true, format: 'png' })) .addField(this.client.customEmojis.avatar + " " + message.translate("common:AVATAR"), user.displayAvatarURL({ size: 512, dynamic: true, format: "png" }))
.setColor(data.config.embed.color) .setColor(data.config.embed.color)
.setFooter(data.config.embed.footer); .setFooter(data.config.embed.footer);

View file

@ -20,9 +20,10 @@ class Avatar extends Command {
async run (message, args) { async run (message, args) {
let user = await this.client.resolveUser(args[0]); let user = await this.client.resolveUser(args[0]);
if (!user) user = message.author; if (!user) user = message.author;
const avatarURL = user.displayAvatarURL({ size: 512, dynamic: true, format: 'png' }); const avatarURL = user.displayAvatarURL({ size: 512, dynamic: true, format: "png" });
if (message.content.includes("-v")) message.channel.send("<"+avatarURL+">"); if (message.content.includes("-v")) message.channel.send(`<${avatarURL}>`);
const attachment = new Discord.MessageAttachment(avatarURL, `avatar.${avatarURL.split(".").pop().split("?")[0]}`); const attachment = new Discord.MessageAttachment(avatarURL, `avatar.${avatarURL.split(".").pop().split("?")[0]}`);
message.channel.send(attachment); message.channel.send(attachment);
} }
}; };

View file

@ -24,7 +24,7 @@ class Sanctions extends Command {
const memberData = await this.client.findOrCreateMember({ id: user.id, guildID: message.guild.id }); const memberData = await this.client.findOrCreateMember({ id: user.id, guildID: message.guild.id });
const embed = new Discord.MessageEmbed() const embed = new Discord.MessageEmbed()
.setAuthor(user.tag, user.displayAvatarURL({ size: 512, dynamic: true, format: 'png' })) .setAuthor(user.tag, user.displayAvatarURL({ size: 512, dynamic: true, format: "png" }))
.setColor(data.config.embed.color) .setColor(data.config.embed.color)
.setFooter(data.config.embed.footer); .setFooter(data.config.embed.footer);

View file

@ -31,7 +31,7 @@ class ServersList extends Command {
.join("\n"); .join("\n");
const embed = new Discord.MessageEmbed() const embed = new Discord.MessageEmbed()
.setAuthor(message.author.tag, message.author.displayAvatarURL({ size: 512, dynamic: true, format: 'png' })) .setAuthor(message.author.tag, message.author.displayAvatarURL({ size: 512, dynamic: true, format: "png" }))
.setColor(data.config.embed.color) .setColor(data.config.embed.color)
.setFooter(this.client.user.username) .setFooter(this.client.user.username)
.setTitle(`${message.translate("common:PAGE")}: ${page}/${Math.ceil(this.client.guilds.cache.size/10)}`) .setTitle(`${message.translate("common:PAGE")}: ${page}/${Math.ceil(this.client.guilds.cache.size/10)}`)

View file

@ -74,6 +74,6 @@ module.exports.load = async(client) => {
// Listen // Listen
app.listen(app.get("port"), () => { app.listen(app.get("port"), () => {
console.log("JaBa Dashboard is listening on port "+app.get("port")); console.log(`JaBa Dashboard is listening on port ${app.get("port")}`);
}); });
}; };

View file

@ -7,7 +7,7 @@ const fetch = require("node-fetch"),
// Gets login page // Gets login page
router.get("/login", async function(req, res) { router.get("/login", async function(req, res) {
if (!req.user || !req.user.id || !req.user.guilds) return res.redirect(`https://discordapp.com/api/oauth2/authorize?client_id=${req.client.user.id}&scope=identify%20guilds&response_type=code&redirect_uri=${encodeURIComponent(req.client.config.dashboard.baseURL+"/api/callback")}&state=${req.query.state || "no"}`); if (!req.user || !req.user.id || !req.user.guilds) return res.redirect(`https://discordapp.com/api/oauth2/authorize?client_id=${req.client.user.id}&scope=identify%20guilds&response_type=code&redirect_uri=${encodeURIComponent(`${req.client.config.dashboard.baseURL}/api/callback`)}&state=${req.query.state || "no"}`);
res.redirect("/selector"); res.redirect("/selector");
}); });
@ -19,7 +19,7 @@ router.get("/callback", async (req, res) => {
const guildID = req.query.state.substr("invite".length, req.query.state.length); const guildID = req.query.state.substr("invite".length, req.query.state.length);
req.client.knownGuilds.push({ id: guildID, user: req.user.id }); req.client.knownGuilds.push({ id: guildID, user: req.user.id });
return res.redirect("/manage/"+guildID); return res.redirect(`/manage/${guildID}`);
}; };
}; };

View file

@ -131,7 +131,7 @@ router.post("/:serverID", CheckAuth, async(req, res) => {
await guildData.save(); await guildData.save();
res.redirect(303, "/manage/"+guild.id); res.redirect(303, `/manage/${guild.id}`);
}); });
module.exports = router; module.exports = router;

View file

@ -1,14 +1,14 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<%- include('includes/head') %> <%- include("includes/head") %>
<body class="hold-transition skin-red sidebar-mini"> <body class="hold-transition skin-red sidebar-mini">
<div class="wrapper"> <div class="wrapper">
<!-- The header is the topbar --> <!-- The header is the topbar -->
<%- include('includes/header') %> <%- include("includes/header") %>
<!-- The sidebar includes the menu --> <!-- The sidebar includes the menu -->
<%- include('includes/sidebar') %> <%- include("includes/sidebar") %>
<!-- Content Wrapper. Contains page content --> <!-- Content Wrapper. Contains page content -->
<div class="content-wrapper"> <div class="content-wrapper">
@ -53,7 +53,7 @@
</div> </div>
<!-- /.content-wrapper --> <!-- /.content-wrapper -->
<%- include('includes/footer') -%> <%- include("includes/footer") -%>
</div> </div>
<!-- ./wrapper --> <!-- ./wrapper -->
</body> </body>

View file

@ -1,14 +1,14 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<%- include('includes/head') %> <%- include("includes/head") %>
<body class="hold-transition skin-red sidebar-mini"> <body class="hold-transition skin-red sidebar-mini">
<div class="wrapper"> <div class="wrapper">
<!-- The header is the topbar --> <!-- The header is the topbar -->
<%- include('includes/header') %> <%- include("includes/header") %>
<!-- The sidebar includes the menu --> <!-- The sidebar includes the menu -->
<%- include('includes/sidebar') %> <%- include("includes/sidebar") %>
<!-- Content Wrapper. Contains page content --> <!-- Content Wrapper. Contains page content -->
<div class="content-wrapper"> <div class="content-wrapper">
@ -53,7 +53,7 @@
</div> </div>
<!-- /.content-wrapper --> <!-- /.content-wrapper -->
<%- include('includes/footer') -%> <%- include("includes/footer") -%>
</div> </div>
<!-- ./wrapper --> <!-- ./wrapper -->
</body> </body>

View file

@ -10,7 +10,7 @@
<div class="pull-left info"> <div class="pull-left info">
<p><%= user.username %></p> <p><%= user.username %></p>
<a href="#"><i <a href="#"><i
class="fa fa-circle text-<%= user.status === 'dnd' ? 'danger' : user.status === 'idle' ? 'warning' : user.status === 'online' ? 'success' : ''%>"></i> class="fa fa-circle text-<%= user.status === "dnd" ? "danger" : user.status === "idle" ? "warning" : user.status === "online" ? "success" : ""%>"></i>
<%= translate("common:STATUS_" + user.status.toUpperCase()) %></a> <%= translate("common:STATUS_" + user.status.toUpperCase()) %></a>
</div> </div>
</div> </div>
@ -47,7 +47,7 @@
<ul class="treeview-menu"> <ul class="treeview-menu">
<% user.displayedGuilds.forEach((guild) => { %> <% user.displayedGuilds.forEach((guild) => { %>
<li><a href="<%= guild.settingsUrl %>"><i <li><a href="<%= guild.settingsUrl %>"><i
class="fa fa-circle-o text-<%= guild.owner ? 'blue' : 'grey' %>"></i> class="fa fa-circle-o text-<%= guild.owner ? "blue" : "grey" %>"></i>
<%= guild.name %></a></li> <%= guild.name %></a></li>
<% }); %> <% }); %>
</ul> </ul>
@ -68,7 +68,7 @@
<script> <script>
$(document).ready(function () { $(document).ready(function () {
// get current URL path and assign 'active' class // get current URL path and assign "active" class
let pathname = window.location.pathname; let pathname = window.location.pathname;
$(`.sidebar-menu > li > a[href="${pathname}"]`).parent().addClass("active"); $(`.sidebar-menu > li > a[href="${pathname}"]`).parent().addClass("active");
$(`.sidebar-menu > li > ul > li > a[href="${window.location.pathname}"]`).parent().addClass("active"); $(`.sidebar-menu > li > ul > li > a[href="${window.location.pathname}"]`).parent().addClass("active");

View file

@ -1,17 +1,17 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<%- include('../includes/head') %> <%- include("../includes/head") %>
<body class="hold-transition skin-red sidebar-mini"> <body class="hold-transition skin-red sidebar-mini">
<div class="wrapper"> <div class="wrapper">
<!-- The header is the topbar --> <!-- The header is the topbar -->
<%- include('../includes/header') %> <%- include("../includes/header") %>
<!-- The sidebar includes the menu --> <!-- The sidebar includes the menu -->
<%- include('../includes/sidebar') %> <%- include("../includes/sidebar") %>
<!-- Content Wrapper. Contains page content --> <!-- Content Wrapper. Contains page content -->
<div class="content-wrapper"> <div class="content-wrapper">
@ -355,7 +355,7 @@
</div> </div>
<!-- /.content-wrapper --> <!-- /.content-wrapper -->
<%- include('../includes/footer') %> <%- include("../includes/footer") %>
</div> </div>
<!-- ./wrapper --> <!-- ./wrapper -->
</body> </body>

View file

@ -1,14 +1,14 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<%- include('includes/head') %> <%- include("includes/head") %>
<body class="hold-transition skin-red sidebar-mini"> <body class="hold-transition skin-red sidebar-mini">
<div class="wrapper"> <div class="wrapper">
<!-- The header is the topbar --> <!-- The header is the topbar -->
<%- include('includes/header') %> <%- include("includes/header") %>
<!-- The sidebar includes the menu --> <!-- The sidebar includes the menu -->
<%- include('includes/sidebar') %> <%- include("includes/sidebar") %>
<!-- Content Wrapper. Contains page content --> <!-- Content Wrapper. Contains page content -->
<div class="content-wrapper"> <div class="content-wrapper">
@ -74,7 +74,7 @@
</div> </div>
<!-- Footer includes credits and version --> <!-- Footer includes credits and version -->
<%- include('includes/footer') %> <%- include("includes/footer") %>
</div> </div>
<!-- ./wrapper --> <!-- ./wrapper -->
</body> </body>

View file

@ -1,7 +1,7 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<%- include('includes/head') %> <%- include("includes/head") %>
<!-- bootstrap datepicker --> <!-- bootstrap datepicker -->
<link rel="stylesheet" href="/bower_components/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css"> <link rel="stylesheet" href="/bower_components/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css">
@ -11,10 +11,10 @@
<div class="wrapper"> <div class="wrapper">
<!-- The header is the topbar --> <!-- The header is the topbar -->
<%- include('includes/header') %> <%- include("includes/header") %>
<!-- The sidebar includes the menu --> <!-- The sidebar includes the menu -->
<%- include('includes/sidebar') %> <%- include("includes/sidebar") %>
<!-- Content Wrapper. Contains page content --> <!-- Content Wrapper. Contains page content -->
<div class="content-wrapper"> <div class="content-wrapper">
@ -78,7 +78,7 @@
<!-- /.content --> <!-- /.content -->
</div> </div>
<!-- /.content-wrapper --> <!-- /.content-wrapper -->
<%- include('includes/footer') %> <%- include("includes/footer") %>
</div> </div>
<!-- ./wrapper --> <!-- ./wrapper -->
<!-- bootstrap datepicker --> <!-- bootstrap datepicker -->
@ -90,7 +90,7 @@
$("#datepicker").datepicker({ $("#datepicker").datepicker({
language: "ru", language: "ru",
title: "Выбор даты", title: "Выбор даты",
format: 'dd/mm/yyyy', format: "dd/mm/yyyy",
clearBtn: true, clearBtn: true,
autoclose: true, autoclose: true,
zIndexOffset: 5 zIndexOffset: 5

View file

@ -52,7 +52,7 @@ const init = async () => {
mongoose.connect(client.config.mongoDB, { useNewUrlParser: true, useUnifiedTopology: true }).then(() => { mongoose.connect(client.config.mongoDB, { useNewUrlParser: true, useUnifiedTopology: true }).then(() => {
client.logger.log("Connected to the Mongodb database.", "log"); client.logger.log("Connected to the Mongodb database.", "log");
}).catch((err) => { }).catch((err) => {
client.logger.log("Unable to connect to the Mongodb database. Error:"+err, "error"); client.logger.log(`Unable to connect to the Mongodb database. Error: ${err}`, "error");
}); });
const languages = require("./helpers/languages"); const languages = require("./helpers/languages");

View file

@ -1,5 +1,5 @@
{ {
"DESCRIPTION": "Возвращает аватар пользователя", "DESCRIPTION": "Возвращает аватар пользователя",
"USAGE": "{{prefix}}avatar (@пользователь)", "USAGE": "{{prefix}}avatar (@пользователь) (-v)",
"EXAMPLES": "{{prefix}}avatar\n{{prefix}}avatar @Jonny_Bro#4226" "EXAMPLES": "{{prefix}}avatar\n{{prefix}}avatar @Jonny_Bro#4226\n{{prefix}}avatar -v"
} }