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

@ -68,15 +68,15 @@ class Slots extends Command {
k2 = (k2 < fruits.length - 1) ? k2 + 1 : 0; k2 = (k2 < fruits.length - 1) ? k2 + 1 : 0;
k3 = (k3 < fruits.length - 1) ? k3 + 1 : 0; k3 = (k3 < fruits.length - 1) ? k3 + 1 : 0;
msg += colonnes[0][i1] + " : " + colonnes[1][j1] + " : "+ colonnes[2][k1] + "\n"; msg += colonnes[0][i1] + " : " + colonnes[1][j1] + " : " + colonnes[2][k1] + "\n";
msg += colonnes[0][i2] + " : " + colonnes[1][j2] + " : "+ colonnes[2][k2] + " **<**\n"; msg += colonnes[0][i2] + " : " + colonnes[1][j2] + " : " + colonnes[2][k2] + " **<**\n";
msg += colonnes[0][i3] + " : " + colonnes[1][j3] + " : "+ colonnes[2][k3] + "\n------------------\n"; msg += colonnes[0][i3] + " : " + colonnes[1][j3] + " : " + colonnes[2][k3] + "\n------------------\n";
if ((colonnes[0][i2] == colonnes[1][j2]) && (colonnes[1][j2] == colonnes[2][k2])) { if ((colonnes[0][i2] == colonnes[1][j2]) && (colonnes[1][j2] == colonnes[2][k2])) {
msg += "| : : : **"+(message.translate("common:VICTORY").toUpperCase())+"** : : : |"; msg += "| : : : **" + (message.translate("common:VICTORY").toUpperCase()) + "** : : : |";
tmsg.edit(msg); tmsg.edit(msg);
const credits = getCredits(amount, true); const credits = getCredits(amount, true);
message.channel.send("**!! ДЖЕКПОТ !!**\n"+message.translate("economy/slots:VICTORY", { money: amount, won: credits, username: message.author.username })); message.channel.send("**!! ДЖЕКПОТ !!**\n" + message.translate("economy/slots:VICTORY", { money: amount, won: credits, username: message.author.username }));
const toAdd = credits - amount; const toAdd = credits - amount;
data.memberData.money = data.memberData.money + toAdd; data.memberData.money = data.memberData.money + toAdd;
if (!data.userData.achievements.slots.achieved) { if (!data.userData.achievements.slots.achieved) {
@ -93,7 +93,7 @@ class Slots extends Command {
}; };
if (colonnes[0][i2] == colonnes[1][j2] || colonnes[1][j2] == colonnes[2][k2] || colonnes[0][i2] == colonnes[2][k2]) { if (colonnes[0][i2] == colonnes[1][j2] || colonnes[1][j2] == colonnes[2][k2] || colonnes[0][i2] == colonnes[2][k2]) {
msg += "| : : : **"+(message.translate("common:VICTORY").toUpperCase())+"** : : : |"; msg += "| : : : **" + (message.translate("common:VICTORY").toUpperCase()) + "** : : : |";
tmsg.edit(msg); tmsg.edit(msg);
const credits = getCredits(amount, false); const credits = getCredits(amount, false);
message.channel.send(message.translate("economy/slots:VICTORY", { message.channel.send(message.translate("economy/slots:VICTORY", {
@ -116,7 +116,7 @@ class Slots extends Command {
return; return;
}; };
msg += "| : : : **"+(message.translate("common:DEFEAT").toUpperCase())+"** : : : |"; msg += "| : : : **" + (message.translate("common:DEFEAT").toUpperCase()) + "** : : : |";
message.channel.send(message.translate("economy/slots:DEFEAT", { message.channel.send(message.translate("economy/slots:DEFEAT", {
money: amount, money: amount,
username: message.author.username username: message.author.username

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,
@ -35,7 +35,7 @@ class Permissions extends Command {
total.allowed++; total.allowed++;
}; };
}); });
text += `\n${total.allowed} ✅ | ${total.denied}`+"\n```"; text += `\n${total.allowed} ✅ | ${total.denied}` + "\n```";
message.channel.send(text); message.channel.send(text);
} }
}; };

View file

@ -20,10 +20,10 @@ 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)
.setTimestamp(m.createdTimestamp); .setTimestamp(m.createdTimestamp);
if (m.attachments.size > 0) embed.setImage(m.attachments.first().url); if (m.attachments.size > 0) embed.setImage(m.attachments.first().url);
return embed; return embed;

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

@ -33,14 +33,14 @@ class Serverinfo extends Command {
const embed = new Discord.MessageEmbed() const embed = new Discord.MessageEmbed()
.setAuthor(guild.name, guild.iconURL({ dynamic: true })) .setAuthor(guild.name, guild.iconURL({ dynamic: true }))
.setThumbnail(guild.iconURL({ dynamic: true })) .setThumbnail(guild.iconURL({ dynamic: true }))
.addField(this.client.customEmojis.title+message.translate("common:NAME"), guild.name, true) .addField(this.client.customEmojis.title + message.translate("common:NAME"), guild.name, true)
.addField(this.client.customEmojis.calendar+message.translate("common:CREATION"), message.printDate(guild.createdAt), true) .addField(this.client.customEmojis.calendar + message.translate("common:CREATION"), message.printDate(guild.createdAt), true)
.addField(this.client.customEmojis.users+message.translate("common:MEMBERS"), message.translate("general/serverinfo:MEMBERS", { count: guild.members.cache.filter(m => !m.user.bot).size })+" | "+message.translate("general/serverinfo:BOTS", { count: guild.members.cache.filter(m => m.user.bot).size }), true) .addField(this.client.customEmojis.users + message.translate("common:MEMBERS"), message.translate("general/serverinfo:MEMBERS", { count: guild.members.cache.filter(m => !m.user.bot).size }) + " | " + message.translate("general/serverinfo:BOTS", { count: guild.members.cache.filter(m => m.user.bot).size }), true)
.addField(this.client.customEmojis.afk+message.translate("general/serverinfo:AFK_CHANNEL"), guild.afkChannel || message.translate("general/serverinfo:NO_AFK_CHANNEL"), true) .addField(this.client.customEmojis.afk + message.translate("general/serverinfo:AFK_CHANNEL"), guild.afkChannel || message.translate("general/serverinfo:NO_AFK_CHANNEL"), true)
.addField(this.client.customEmojis.id+message.translate("common:ID"), guild.id, true) .addField(this.client.customEmojis.id + message.translate("common:ID"), guild.id, true)
.addField(this.client.customEmojis.crown+message.translate("common:OWNER"), guild.owner, true) .addField(this.client.customEmojis.crown + message.translate("common:OWNER"), guild.owner, true)
.addField(this.client.customEmojis.boost+message.translate("general/serverinfo:BOOSTS"), guild.premiumSubscriptionCount || 0, true) .addField(this.client.customEmojis.boost + message.translate("general/serverinfo:BOOSTS"), guild.premiumSubscriptionCount || 0, true)
.addField(this.client.customEmojis.channels+message.translate("common:CHANNELS"), message.translate("general/serverinfo:TEXT_CHANNELS", { count: guild.channels.cache.filter(c => c.type === "text").size })+" | "+message.translate("general/serverinfo:VOICE_CHANNELS", { count: guild.channels.cache.filter(c => c.type === "voice").size })+" | "+message.translate("general/serverinfo:CAT_CHANNELS", { count: guild.channels.cache.filter(c => c.type === "category").size }), true) .addField(this.client.customEmojis.channels + message.translate("common:CHANNELS"), message.translate("general/serverinfo:TEXT_CHANNELS", { count: guild.channels.cache.filter(c => c.type === "text").size }) + " | " + message.translate("general/serverinfo:VOICE_CHANNELS", { count: guild.channels.cache.filter(c => c.type === "voice").size }) + " | " + message.translate("general/serverinfo:CAT_CHANNELS", { count: guild.channels.cache.filter(c => c.type === "category").size }), 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

@ -23,17 +23,17 @@ class Stats extends Command {
.setFooter(data.config.embed.footer) .setFooter(data.config.embed.footer)
.setAuthor(message.translate("common:STATS")) .setAuthor(message.translate("common:STATS"))
.setDescription(message.translate("general/stats:MADE")) .setDescription(message.translate("general/stats:MADE"))
.addField(this.client.customEmojis.stats+" "+message.translate("general/stats:COUNTS_TITLE"), message.translate("general/stats:COUNTS_CONTENT", { servers: this.client.guilds.cache.size, users: this.client.users.cache.size }), true) .addField(this.client.customEmojis.stats + " " + message.translate("general/stats:COUNTS_TITLE"), message.translate("general/stats:COUNTS_CONTENT", { servers: this.client.guilds.cache.size, users: this.client.users.cache.size }), true)
.addField(this.client.customEmojis.version+" "+message.translate("general/stats:VERSIONS_TITLE"), `\`Discord.js : v${Discord.version}\`\n\`Nodejs : v${process.versions.node}\``, true) .addField(this.client.customEmojis.version + " " + message.translate("general/stats:VERSIONS_TITLE"), `\`Discord.js : v${Discord.version}\`\n\`Nodejs : v${process.versions.node}\``, true)
.addField(this.client.customEmojis.ram+" "+message.translate("general/stats:RAM_TITLE"), `\`${(process.memoryUsage().heapUsed / 1024 / 1024).toFixed(2)}MB\``, true) .addField(this.client.customEmojis.ram + " " + message.translate("general/stats:RAM_TITLE"), `\`${(process.memoryUsage().heapUsed / 1024 / 1024).toFixed(2)}MB\``, true)
.addField(this.client.customEmojis.status.online+" "+message.translate("general/stats:ONLINE_TITLE"), message.translate("general/stats:ONLINE_CONTENT", { time: message.convertTime(Date.now()+this.client.uptime, "from", true) })) .addField(this.client.customEmojis.status.online + " " + message.translate("general/stats:ONLINE_TITLE"), message.translate("general/stats:ONLINE_CONTENT", { time: message.convertTime(Date.now()+this.client.uptime, "from", true) }))
.addField(this.client.customEmojis.voice+" "+message.translate("general/stats:MUSIC_TITLE"), message.translate("general/stats:MUSIC_CONTENT", { count: this.client.voice.connections.size })) .addField(this.client.customEmojis.voice + " " + message.translate("general/stats:MUSIC_TITLE"), message.translate("general/stats:MUSIC_CONTENT", { count: this.client.voice.connections.size }))
.addField(message.translate("general/stats:CREDITS_TITLE"), message.translate("general/stats:CREDITS_CONTENT", { .addField(message.translate("general/stats:CREDITS_TITLE"), message.translate("general/stats:CREDITS_CONTENT", {
donators: [ ":(" ].join("\n"), donators: [ ":(" ].join("\n"),
translators: [ "`Jonny_Bro#4226` (:flag_ru:)", "`[ДАННЫЕ УДАЛЕНЫ]#2789` (:flag_ua:)", "`FaxoNfuckyou#9398` и `Jonny_Bro#4226` (:flag_us:)" ].join("\n") translators: [ "`Jonny_Bro#4226` (:flag_ru:)", "`[ДАННЫЕ УДАЛЕНЫ]#2789` (:flag_ua:)", "`FaxoNfuckyou#9398` и `Jonny_Bro#4226` (:flag_us:)" ].join("\n")
})); }));
statsEmbed.addField(this.client.customEmojis.link+" "+message.translate("general/stats:LINKS_TITLE"), message.translate("misc:STATS_FOOTER", { statsEmbed.addField(this.client.customEmojis.link + " " + message.translate("general/stats:LINKS_TITLE"), message.translate("misc:STATS_FOOTER", {
dashboardLink: "https://jaba.pp.ua", dashboardLink: "https://jaba.pp.ua",
donateLink: "https://qiwi.com/n/JONNYBRO", donateLink: "https://qiwi.com/n/JONNYBRO",
owner: this.client.config.owner.id owner: this.client.config.owner.id

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

@ -22,7 +22,7 @@ class Translate extends Command {
async run (message, args, data) { async run (message, args, data) {
if (args[0] === "langs-list") { if (args[0] === "langs-list") {
const langsList = "```css\n"+(langs.map((l, i) => `#${i+1} - ${l}`).join("\n"))+"```"; const langsList = "```css\n" + (langs.map((l, i) => `#${i+1} - ${l}`).join("\n")) + "```";
message.author.send(langsList).then(() => { message.author.send(langsList).then(() => {
message.success("general/translate:LIST_SENT"); message.success("general/translate:LIST_SENT");
}).catch(() => { }).catch(() => {
@ -47,9 +47,9 @@ 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)
.setFooter(data.config.embed.footer); .setFooter(data.config.embed.footer);

View file

@ -41,43 +41,43 @@ 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);
if (displayPresence) { if (displayPresence) {
embed.addField(this.client.customEmojis.games+" "+message.translate("common:GAME"), (user.presence.activity ? user.presence.activity.name : message.translate("general/userinfo:NO_GAME")), true) embed.addField(this.client.customEmojis.games + " " + message.translate("common:GAME"), (user.presence.activity ? user.presence.activity.name : message.translate("general/userinfo:NO_GAME")), true)
embed.addField(this.client.customEmojis.status.online+" "+message.translate("common:STATUS"), message.translate("common:STATUS_"+(user.presence.status.toUpperCase())), true); embed.addField(this.client.customEmojis.status.online + " " + message.translate("common:STATUS"), message.translate("common:STATUS_" + (user.presence.status.toUpperCase())), true);
}; };
if (member) { if (member) {
embed.addField(this.client.customEmojis.up+" "+message.translate("common:ROLE"), (member.roles.highest ? member.roles.highest : message.translate("general/userinfo:NO_ROLE")), true) embed.addField(this.client.customEmojis.up + " " + message.translate("common:ROLE"), (member.roles.highest ? member.roles.highest : message.translate("general/userinfo:NO_ROLE")), true)
embed.addField(this.client.customEmojis.calendar2+" "+message.translate("common:JOIN"), message.printDate(member.joinedAt),true) embed.addField(this.client.customEmojis.calendar2 + " " + message.translate("common:JOIN"), message.printDate(member.joinedAt),true)
embed.addField(this.client.customEmojis.color+" "+message.translate("common:COLOR"), member.displayHexColor, true) embed.addField(this.client.customEmojis.color + " " + message.translate("common:COLOR"), member.displayHexColor, true)
embed.addField(this.client.customEmojis.pencil+" "+message.translate("common:NICKNAME"), (member.nickname ? member.nickname : message.translate("general/userinfo:NO_NICKNAME")), true) embed.addField(this.client.customEmojis.pencil + " " + message.translate("common:NICKNAME"), (member.nickname ? member.nickname : message.translate("general/userinfo:NO_NICKNAME")), true)
embed.addField(this.client.customEmojis.roles+" "+message.translate("common:ROLES"), (member.roles.size > 10 ? member.roles.cache.map((r) => r).slice(0, 9).join(", ")+" "+message.translate("general/userinfo:MORE_ROLES", { count: member.roles.cache.size - 10 }) : (member.roles.cache.size < 1) ? message.translate("general/userinfo:NO_ROLE") : member.roles.cache.map((r) => r).join(", "))); embed.addField(this.client.customEmojis.roles + " " + message.translate("common:ROLES"), (member.roles.size > 10 ? member.roles.cache.map((r) => r).slice(0, 9).join(", ") + " " + message.translate("general/userinfo:MORE_ROLES", { count: member.roles.cache.size - 10 }) : (member.roles.cache.size < 1) ? message.translate("general/userinfo:NO_ROLE") : member.roles.cache.map((r) => r).join(", ")));
}; };
if (user.bot && this.client.config.apiKeys.dbl && (this.client.config.apiKeys.dbl !== "")) { if (user.bot && this.client.config.apiKeys.dbl && (this.client.config.apiKeys.dbl !== "")) {
const res = await fetch("https://discordbots.org/api/bots/"+user.id, { const res = await fetch("https://discordbots.org/api/bots/" + user.id, {
headers: { "Authorization": this.client.config.apiKeys.dbl } headers: { "Authorization": this.client.config.apiKeys.dbl }
}); });
const data = await res.json(); const data = await res.json();
if (!data.error) { if (!data.error) {
embed.addField(this.client.customEmojis.desc+" "+message.translate("common:DESCRIPTION"), data.shortdesc, true) embed.addField(this.client.customEmojis.desc + " " + message.translate("common:DESCRIPTION"), data.shortdesc, true)
.addField(this.client.customEmojis.stats+" "+message.translate("common:STATS"), message.translate("general/userinfo:BOT_STATS", { .addField(this.client.customEmojis.stats + " " + message.translate("common:STATS"), message.translate("general/userinfo:BOT_STATS", {
votes: data.monthlyPoints || 0, votes: data.monthlyPoints || 0,
servers: data.server_count || 0, servers: data.server_count || 0,
shards: (data.shards || [0]).length, shards: (data.shards || [0]).length,
lib: data.lib || "unknown" lib: data.lib || "unknown"
}), true) }), true)
.addField(this.client.customEmojis.link+" "+message.translate("common:LINKS"), `${data.support ? `[${message.translate("common:SUPPORT")}](${data.support}) | ` : ""}${data.invite ? `[${message.translate("common:INVITE")}](${data.invite}) | ` : ""}${data.github ? `[GitHub](${data.github}) | ` : ""}${data.website ? `[${message.translate("common:WEBSITE")}](${data.website})` : ""}`, true); .addField(this.client.customEmojis.link + " " + message.translate("common:LINKS"), `${data.support ? `[${message.translate("common:SUPPORT")}](${data.support}) | ` : ""}${data.invite ? `[${message.translate("common:INVITE")}](${data.invite}) | ` : ""}${data.github ? `[GitHub](${data.github}) | ` : ""}${data.website ? `[${message.translate("common:WEBSITE")}](${data.website})` : ""}`, true);
}; };
}; };

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

@ -28,12 +28,12 @@ class Checkinvites extends Command {
withInvite.push({ withInvite.push({
id: m.user.id, id: m.user.id,
tag: Discord.Util.escapeMarkdown(m.user.tag), tag: Discord.Util.escapeMarkdown(m.user.tag),
links: "**"+Discord.Util.escapeMarkdown(inviteLinks.join(", "))+"**" links: "**" + Discord.Util.escapeMarkdown(inviteLinks.join(", ")) + "**"
}); });
}; };
}); });
const text = (withInvite.length > 0 ? withInvite.map((m) => "`"+m.id+"` ("+m.tag+") : "+m.links).join("\n") : message.translate("moderation/checkinvites:NOBODY")); const text = (withInvite.length > 0 ? withInvite.map((m) => "`" + m.id + "` (" + m.tag + ") : " + m.links).join("\n") : message.translate("moderation/checkinvites:NOBODY"));
const embed = new Discord.MessageEmbed() const embed = new Discord.MessageEmbed()
.setDescription(text) .setDescription(text)

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);
@ -33,7 +33,7 @@ class Sanctions extends Command {
return message.channel.send(embed); return message.channel.send(embed);
} else { } else {
memberData.sanctions.forEach((s) => { memberData.sanctions.forEach((s) => {
embed.addField(s.type+" | #"+s.case, `${message.translate("common:MODERATOR")}: <@${s.moderator}>\n${message.translate("common:REASON")}: ${s.reason}`, true); embed.addField(s.type + " | #" + s.case, `${message.translate("common:MODERATOR")}: <@${s.moderator}>\n${message.translate("common:REASON")}: ${s.reason}`, true);
}); });
}; };
message.channel.send(embed); message.channel.send(embed);

View file

@ -36,7 +36,7 @@ class Lyrics extends Command {
let lyrics = await lyricsParse(songNameFormated, artistName) || "Не найдено!"; let lyrics = await lyricsParse(songNameFormated, artistName) || "Не найдено!";
if (lyrics.length > 2040) { if (lyrics.length > 2040) {
lyrics = lyrics.substr(0, 2000) + message.translate("music/lyrics:AND_MORE") + " ["+message.translate("music/lyrics:CLICK_HERE")+"]"+`https://www.musixmatch.com/search/${songName}`; lyrics = lyrics.substr(0, 2000) + message.translate("music/lyrics:AND_MORE") + " [" + message.translate("music/lyrics:CLICK_HERE") + "]" + `https://www.musixmatch.com/search/${songName}`;
} else if (!lyrics.length) { } else if (!lyrics.length) {
return message.error("music/lyrics:NO_LYRICS_FOUND", { songName }); return message.error("music/lyrics:NO_LYRICS_FOUND", { songName });
}; };

View file

@ -35,7 +35,7 @@ class Np extends Command {
.addField(message.translate("music/np:T_TITLE"), track.title, true) .addField(message.translate("music/np:T_TITLE"), track.title, true)
.addField(message.translate("music/np:T_CHANNEL"), track.author, true) .addField(message.translate("music/np:T_CHANNEL"), track.author, true)
.addField(message.translate("music/np:T_DURATION"), message.convertTime(Date.now()+track.durationMS, "to", true), true) .addField(message.translate("music/np:T_DURATION"), message.convertTime(Date.now()+track.durationMS, "to", true), true)
.addField(message.translate("music/np:T_DESCRIPTION"), track.description ? (track.description.substring(0, 150)+"\n"+(message.translate("common:AND_MORE").toLowerCase())) : message.translate("music/np:NO_DESCRIPTION"), true) .addField(message.translate("music/np:T_DESCRIPTION"), track.description ? (track.description.substring(0, 150) + "\n" + (message.translate("common:AND_MORE").toLowerCase())) : message.translate("music/np:NO_DESCRIPTION"), true)
.addField("\u200B", this.client.player.createProgressBar(message, { timecodes: true })) .addField("\u200B", this.client.player.createProgressBar(message, { timecodes: true }))
.setTimestamp() .setTimestamp()
.setColor(data.config.embed.color) .setColor(data.config.embed.color)

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

@ -52,7 +52,7 @@ router.post("/:serverID", CheckAuth, async(req, res) => {
const welcome = { const welcome = {
enabled: true, enabled: true,
message: data.message, message: data.message,
channel: guild.channels.cache.find((ch) => "#"+ch.name === data.channel).id, channel: guild.channels.cache.find((ch) => "#" + ch.name === data.channel).id,
withImage: data.withImage === "on" withImage: data.withImage === "on"
}; };
guildData.plugins.welcome = welcome; guildData.plugins.welcome = welcome;
@ -76,7 +76,7 @@ router.post("/:serverID", CheckAuth, async(req, res) => {
const goodbye = { const goodbye = {
enabled: true, enabled: true,
message: data.message, message: data.message,
channel: guild.channels.cache.find((ch) => "#"+ch.name === data.channel).id, channel: guild.channels.cache.find((ch) => "#" + ch.name === data.channel).id,
withImage: data.withImage === "on" withImage: data.withImage === "on"
}; };
guildData.plugins.goodbye = goodbye; guildData.plugins.goodbye = goodbye;
@ -99,7 +99,7 @@ router.post("/:serverID", CheckAuth, async(req, res) => {
if (Object.prototype.hasOwnProperty.call(data, "autoroleEnable") || Object.prototype.hasOwnProperty.call(data, "autoroleUpdate")) { if (Object.prototype.hasOwnProperty.call(data, "autoroleEnable") || Object.prototype.hasOwnProperty.call(data, "autoroleUpdate")) {
const autorole = { const autorole = {
enabled: true, enabled: true,
role: guild.roles.cache.find((r) => "@"+r.name === data.role).id role: guild.roles.cache.find((r) => "@" + r.name === data.role).id
}; };
guildData.plugins.autorole = autorole; guildData.plugins.autorole = autorole;
guildData.markModified("plugins.autorole"); guildData.markModified("plugins.autorole");
@ -118,20 +118,20 @@ router.post("/:serverID", CheckAuth, async(req, res) => {
if (Object.prototype.hasOwnProperty.call(data, "suggestions")) { if (Object.prototype.hasOwnProperty.call(data, "suggestions")) {
if (data.suggestions === req.translate("common:NO_CHANNEL")) guildData.plugins.suggestions = false; if (data.suggestions === req.translate("common:NO_CHANNEL")) guildData.plugins.suggestions = false;
else guildData.plugins.suggestions = guild.channels.cache.find((ch) => "#"+ch.name === data.suggestions).id; else guildData.plugins.suggestions = guild.channels.cache.find((ch) => "#" + ch.name === data.suggestions).id;
if (data.modlogs === req.translate("common:NO_CHANNEL")) guildData.plugins.modlogs = false; if (data.modlogs === req.translate("common:NO_CHANNEL")) guildData.plugins.modlogs = false;
else guildData.plugins.modlogs = guild.channels.cache.find((ch) => "#"+ch.name === data.modlogs).id; else guildData.plugins.modlogs = guild.channels.cache.find((ch) => "#" + ch.name === data.modlogs).id;
if (data.fortniteshop === req.translate("common:NO_CHANNEL")) guildData.plugins.fortniteshop = false; if (data.fortniteshop === req.translate("common:NO_CHANNEL")) guildData.plugins.fortniteshop = false;
else guildData.plugins.fortniteshop = guild.channels.cache.find((ch) => "#"+ch.name === data.fortniteshop).id; else guildData.plugins.fortniteshop = guild.channels.cache.find((ch) => "#" + ch.name === data.fortniteshop).id;
guildData.markModified("plugins"); guildData.markModified("plugins");
}; };
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,8 +10,8 @@
<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>
<!-- search form --> <!-- search form -->
@ -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

@ -23,7 +23,7 @@ module.exports = {
case: null case: null
}; };
memberData.save(); memberData.save();
client.logger.log("[unmute] "+memberData.id+" cannot be found."); client.logger.log("[unmute] " + memberData.id + " cannot be found.");
return null; return null;
}); });

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"
} }