Фикс всех найденых ошибок

This commit is contained in:
JonnyBro 2022-01-04 21:16:52 +05:00
parent 337a3f1efb
commit 50f84d317b
53 changed files with 97 additions and 519 deletions

4
.gitignore vendored
View file

@ -6,10 +6,6 @@ node_modules
package-lock.json package-lock.json
yarn.lock yarn.lock
# Fortnite Shop images
assets/img/fortnite/shop/**/*.png
!assets/img/fortnite/shop/**/example-shop.png
# DB # DB
giveaways.json giveaways.json

View file

@ -1 +1 @@
# JaBa-new # JaBa

View file

@ -53,7 +53,6 @@ module.exports = mongoose.model("Guild", new Schema({
modlogs: false, // the channel in which the moderation logs (mute, kick, ban, etc...) will be sent modlogs: false, // the channel in which the moderation logs (mute, kick, ban, etc...) will be sent
birthdays: false, // the channel in which birtdays announcements will be sent birthdays: false, // the channel in which birtdays announcements will be sent
reports: false, // the channel in which the reports will be sent reports: false, // the channel in which the reports will be sent
fortniteshop: false, // the channel in which the fortnite shop image will be sent at 2.05am
logs: false // the channel in which the logs (message deleted, etc...) will be sent logs: false // the channel in which the logs (message deleted, etc...) will be sent
}}, }},
slowmode: { type: Object, default: { // Servers slowmode slowmode: { type: Object, default: { // Servers slowmode

View file

@ -108,10 +108,12 @@ userSchema.method("getAchievements", async function() {
await Canvas.loadImage(`./assets/img/achievements/achievement${this.achievements.invite.achieved ? "_colored" : ""}7.png`) await Canvas.loadImage(`./assets/img/achievements/achievement${this.achievements.invite.achieved ? "_colored" : ""}7.png`)
]; ];
let dim = 0; let dim = 0;
for (let i = 0; i < images.length; i++) { for (let i = 0; i < images.length; i++) {
await ctx.drawImage(images[i], dim, 10, 350, 200); await ctx.drawImage(images[i], dim, 10, 350, 200);
dim += 200; dim += 200;
}; };
return canvas.toBuffer(); return canvas.toBuffer();
}); });

View file

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

View file

@ -1,81 +0,0 @@
const Command = require("../../base/Command.js"),
Discord = require("discord.js"),
Canvas = require("discord-canvas");
class Setfortniteshop extends Command {
constructor(client) {
super(client, {
name: "setfortniteshop",
dirname: __dirname,
enabled: true,
guildOnly: true,
aliases: ["setfnshop"],
memberPermissions: ["MANAGE_GUILD"],
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS"],
nsfw: false,
ownerOnly: false,
cooldown: 1000
});
}
async run(message, args, data) {
if (!data.config.apiKeys.fortniteFNBR || data.config.apiKeys.fortniteFNBR.length === "") return message.error("misc:COMMAND_DISABLED");
if (data.guild.plugins.fortniteshop && !message.mentions.channels.first() || message.mentions.channels.first() && data.guild.plugins.fortniteshop === message.mentions.channels.first().id) {
data.guild.plugins.fortniteshop = false;
data.guild.markModified("plugins.fortniteshop");
data.guild.save();
return message.success("administration/setfortniteshop:DISABLED");
};
const channel = message.mentions.channels.first() || message.channel;
data.guild.plugins.fortniteshop = channel.id;
data.guild.markModified("plugins.fortniteshop");
data.guild.save();
message.success("administration/setfortniteshop:ENABLED", {
channel: channel.toString()
});
const momentName = this.client.languages.find((language) => language.name === data.guild.language || language.aliases.includes(data.guild.language)).moment;
const shop = new Canvas.FortniteShop();
const image = await shop
.setToken(data.config.apiKeys.fortniteFNBR)
.setText("header", message.translate("general/fortniteshop:HEADER"))
.setText("daily", message.translate("general/fortniteshop:DAILY"))
.setText("featured", message.translate("general/fortniteshop:FEATURED"))
.setText("date", message.translate("general/fortniteshop:DATE", {
skipInterpolation: true
}).replace("{{date}}", "{date}"))
.setText("footer", message.translate("general/fortniteshop:FOOTER"))
.lang(momentName)
.toAttachment();
const attachment = new Discord.MessageAttachment(image, "shop.png");
const embed = new Discord.MessageEmbed()
.setAuthor({
name: this.client.translate("general/fortniteshop:DATE", {
date: this.client.printDate(new Date(Date.now()), null, message.guild.data.language)
}, message.guild.data.language),
iconURL: this.client.user.displayAvatarURL({
size: 512,
dynamic: true,
format: "png"
})
})
.setImage("attachment://shop.png")
.setColor(data.config.embed.color)
.setFooter({
text: data.config.embed.footer
});
const msg = await channel.send({
embeds: [embed],
files: [attachment]
});
await msg.react("😍");
await msg.react("😐");
await msg.react("😭");
}
};
module.exports = Setfortniteshop;

View file

@ -18,6 +18,15 @@ class Achievements extends Command {
} }
async run(message, args, data) { async run(message, args, data) {
const arg = args[0] || message.author
let member = await this.client.resolveMember(arg, message.guild);
if (!member) member = message.member;
if (member.user.bot) return message.error("economy/profile:BOT_USER");
const userData = (member.id === message.author.id ? data.userData : await this.client.findOrCreateUser({
id: member.id
}));
const embed = new Discord.MessageEmbed() const embed = new Discord.MessageEmbed()
.setAuthor({ .setAuthor({
name: message.translate("economy/achievements:TITLE") name: message.translate("economy/achievements:TITLE")
@ -28,39 +37,39 @@ class Achievements extends Command {
}); });
embed.addField(message.translate("economy/achievements:SEND_CMD"), message.translate("economy/achievements:PROGRESS", { embed.addField(message.translate("economy/achievements:SEND_CMD"), message.translate("economy/achievements:PROGRESS", {
now: data.userData.achievements.firstCommand.progress.now, now: userData.achievements.firstCommand.progress.now,
total: data.userData.achievements.firstCommand.progress.total, total: userData.achievements.firstCommand.progress.total,
percent: Math.round(100 * (data.userData.achievements.firstCommand.progress.now / data.userData.achievements.firstCommand.progress.total)) percent: Math.round(100 * (userData.achievements.firstCommand.progress.now / userData.achievements.firstCommand.progress.total))
})); }));
embed.addField(message.translate("economy/achievements:CLAIM_SALARY"), message.translate("economy/achievements:PROGRESS", { embed.addField(message.translate("economy/achievements:CLAIM_SALARY"), message.translate("economy/achievements:PROGRESS", {
now: data.userData.achievements.work.progress.now, now: userData.achievements.work.progress.now,
total: data.userData.achievements.work.progress.total, total: userData.achievements.work.progress.total,
percent: Math.round(100 * (data.userData.achievements.work.progress.now / data.userData.achievements.work.progress.total)) percent: Math.round(100 * (userData.achievements.work.progress.now / userData.achievements.work.progress.total))
})); }));
embed.addField(message.translate("economy/achievements:MARRY"), message.translate("economy/achievements:PROGRESS", { embed.addField(message.translate("economy/achievements:MARRY"), message.translate("economy/achievements:PROGRESS", {
now: data.userData.achievements.married.progress.now, now: userData.achievements.married.progress.now,
total: data.userData.achievements.married.progress.total, total: userData.achievements.married.progress.total,
percent: Math.round(100 * (data.userData.achievements.married.progress.now / data.userData.achievements.married.progress.total)) percent: Math.round(100 * (userData.achievements.married.progress.now / userData.achievements.married.progress.total))
})); }));
embed.addField(message.translate("economy/achievements:SLOTS"), message.translate("economy/achievements:PROGRESS", { embed.addField(message.translate("economy/achievements:SLOTS"), message.translate("economy/achievements:PROGRESS", {
now: data.userData.achievements.slots.progress.now, now: userData.achievements.slots.progress.now,
total: data.userData.achievements.slots.progress.total, total: userData.achievements.slots.progress.total,
percent: Math.round(100 * (data.userData.achievements.slots.progress.now / data.userData.achievements.slots.progress.total)) percent: Math.round(100 * (userData.achievements.slots.progress.now / userData.achievements.slots.progress.total))
})); }));
embed.addField(message.translate("economy/achievements:TIP"), message.translate("economy/achievements:PROGRESS", { embed.addField(message.translate("economy/achievements:TIP"), message.translate("economy/achievements:PROGRESS", {
now: data.userData.achievements.tip.progress.now, now: userData.achievements.tip.progress.now,
total: data.userData.achievements.tip.progress.total, total: userData.achievements.tip.progress.total,
percent: Math.round(100 * (data.userData.achievements.tip.progress.now / data.userData.achievements.tip.progress.total)) percent: Math.round(100 * (userData.achievements.tip.progress.now / userData.achievements.tip.progress.total))
})); }));
embed.addField(message.translate("economy/achievements:REP"), message.translate("economy/achievements:PROGRESS", { embed.addField(message.translate("economy/achievements:REP"), message.translate("economy/achievements:PROGRESS", {
now: data.userData.achievements.rep.progress.now, now: userData.achievements.rep.progress.now,
total: data.userData.achievements.rep.progress.total, total: userData.achievements.rep.progress.total,
percent: Math.round(100 * (data.userData.achievements.rep.progress.now / data.userData.achievements.rep.progress.total)) percent: Math.round(100 * (userData.achievements.rep.progress.now / userData.achievements.rep.progress.total))
})); }));
embed.addField(message.translate("economy/achievements:INVITE"), message.translate("economy/achievements:PROGRESS", { embed.addField(message.translate("economy/achievements:INVITE"), message.translate("economy/achievements:PROGRESS", {
now: data.userData.achievements.invite.progress.now, now: userData.achievements.invite.progress.now,
total: data.userData.achievements.invite.progress.total, total: userData.achievements.invite.progress.total,
percent: Math.round(100 * (data.userData.achievements.invite.progress.now / data.userData.achievements.invite.progress.total)) percent: Math.round(100 * (userData.achievements.invite.progress.now / userData.achievements.invite.progress.total))
})); }));
message.channel.send({ message.channel.send({

View file

@ -27,7 +27,7 @@ class Pay extends Command {
const amount = Math.ceil(parseInt(sentAmount, 10)); const amount = Math.ceil(parseInt(sentAmount, 10));
if (amount > data.memberData.money) return message.error("economy/pay:ENOUGH_MONEY", { if (amount > data.memberData.money) return message.error("economy/pay:ENOUGH_MONEY", {
amount: `${amount} ${message.getNoun(amount, message.translate("misc:NOUNS:CREDITS:1"), message.translate("misc:NOUNS:CREDITS:2"), message.translate("misc:NOUNS:CREDITS:5"))}` amount: `**${amount}** ${message.getNoun(amount, message.translate("misc:NOUNS:CREDITS:1"), message.translate("misc:NOUNS:CREDITS:2"), message.translate("misc:NOUNS:CREDITS:5"))}`
}); });
const memberData = await this.client.findOrCreateMember({ const memberData = await this.client.findOrCreateMember({
@ -42,7 +42,7 @@ class Pay extends Command {
memberData.save(); memberData.save();
message.success("economy/pay:SUCCESS", { message.success("economy/pay:SUCCESS", {
amount: `${amount} ${message.getNoun(amount, message.translate("misc:NOUNS:CREDIT:1"), message.translate("misc:NOUNS:CREDIT:2"), message.translate("misc:NOUNS:CREDIT:5"))}`, amount: `**${amount}** ${message.getNoun(amount, message.translate("misc:NOUNS:CREDIT:1"), message.translate("misc:NOUNS:CREDIT:2"), message.translate("misc:NOUNS:CREDIT:5"))}`,
username: member.user.tag username: member.user.tag
}); });
} }

View file

@ -82,12 +82,14 @@ class Profile extends Command {
}) // Sets the footer of the embed }) // Sets the footer of the embed
.setTimestamp(); .setTimestamp();
const buffer = userData.getAchievements(); const buffer = await userData.getAchievements();
message.channel.send({ message.channel.send({
embeds: [profileEmbed], embeds: [profileEmbed],
// files: [{ files: [{
// attachment: buffer name: "achievements.png",
// }] attachment: buffer
}]
}); // Send the embed in the current channel }); // Send the embed in the current channel
} }
}; };

View file

@ -83,7 +83,7 @@ class Work extends Command {
data.memberData.save(); data.memberData.save();
const messageOptions = { const messageOptions = {
emdeds: embed embeds: [embed]
}; };
if (!data.userData.achievements.work.achieved) { if (!data.userData.achievements.work.achieved) {
data.userData.achievements.work.progress.now += 1; data.userData.achievements.work.progress.now += 1;

View file

@ -68,8 +68,9 @@ class Number extends Command {
}); });
userdata.money = userdata.money + won; userdata.money = userdata.money + won;
userdata.save(); userdata.save();
collector.stop(msg.author.username);
}; };
collector.stop();
}; };
if (parseInt(msg.content) < number) message.error("fun/number:BIG", { if (parseInt(msg.content) < number) message.error("fun/number:BIG", {
user: msg.author.toString(), user: msg.author.toString(),

View file

@ -6,7 +6,7 @@ class TicTacToe extends Command {
super(client, { super(client, {
name: "tictactoe", name: "tictactoe",
dirname: __dirname, dirname: __dirname,
enabled: true, enabled: false,
guildOnly: false, guildOnly: false,
aliases: ["ttt"], aliases: ["ttt"],
memberPermissions: [], memberPermissions: [],

View file

@ -1,81 +0,0 @@
const Command = require("../../base/Command.js"),
Canvas = require("discord-canvas"),
Discord = require("discord.js");
class Fortnite extends Command {
constructor(client) {
super(client, {
name: "fortnite",
dirname: __dirname,
enabled: true,
guildOnly: false,
aliases: ["fn"],
memberPermissions: [],
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS"],
nsfw: false,
ownerOnly: false,
cooldown: 2000
});
}
async run(message, args, data) {
if (!data.config.apiKeys.fortniteTRN || data.config.apiKeys.fortniteTRN.length === "") return message.success("misc:COMMAND_DISABLED");
const stats = new Canvas.FortniteStats();
const platform = args[0].toLowerCase();
if (!platform || (platform !== "pc" && platform !== "xbl" && platform !== "psn")) return message.error("general/fortnite:MISSING_PLATFORM");
const user = args.slice(1).join(" ");
if (!user) return message.error("general/fortnite:MISSING_USERNAME");
const m = await message.sendT("misc:PLEASE_WAIT", null, {
prefixEmoji: "loading"
});
const statsImage = await stats
.setToken(data.config.apiKeys.fortniteTRN)
.setUser(user)
.setPlatform(platform)
.setText("averageKills", message.translate("general/fortnite:AVERAGE_KILLS"))
.setText("averageKill", message.translate("general/fortnite:AVERAGE_KILL"))
.setText("wPercent", message.translate("general/fortnite:W_PERCENT"))
.setText("winPercent", message.translate("general/fortnite:WIN_PERCENT"))
.setText("kD", message.translate("general/fortnite:KD"))
.setText("wins", message.translate("general/fortnite:WINS"))
.setText("win", message.translate("general/fortnite:WIN"))
.setText("kills", message.translate("general/fortnite:KILLS"))
.setText("kill", message.translate("general/fortnite:KILL"))
.setText("matches", message.translate("general/fortnite:MATCHES"))
.setText("match", message.translate("general/fortnite:MATCH"))
.setText("footer", message.translate("general/fortnite:FOOTER"))
.toAttachment();
if (!statsImage) {
m.delete();
return message.error("general/fortnite:NOT_FOUND", {
platform,
search: user
});
};
// Send embed
const attachment = new Discord.MessageAttachment(statsImage.toBuffer(), "fortnite-stats-image.png"),
embed = new Discord.MessageEmbed()
.setDescription(message.translate("general/fortnite:TITLE", {
username: `[${stats.data.username}](${stats.data.url.replace(new RegExp(" ", "g"), "%20")})`
}))
.setImage("attachment://fortnite-stats-image.png")
.setColor(data.config.embed.color)
.setFooter({
text: data.config.embed.footer
});
message.channel.send({
embeds: [embed],
files: [attachment]
});
m.delete();
}
};
module.exports = Fortnite;

View file

@ -1,68 +0,0 @@
const Command = require("../../base/Command.js"),
Discord = require("discord.js"),
Canvas = require("discord-canvas");
class Fortniteshop extends Command {
constructor(client) {
super(client, {
name: "fortniteshop",
dirname: __dirname,
enabled: true,
guildOnly: false,
aliases: ["fns"],
memberPermissions: [],
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS"],
nsfw: false,
ownerOnly: false,
cooldown: 2000
});
}
async run(message, args, data) {
if (!data.config.apiKeys.fortniteFNBR || data.config.apiKeys.fortniteFNBR.length === "") return message.error("misc:COMMAND_DISABLED");
const m = await message.sendT("misc:PLEASE_WAIT", null, {
prefixEmoji: "loading"
});
const momentName = this.client.languages.find((language) => language.name === data.guild.language || language.aliases.includes(data.guild.language)).moment;
const shop = new Canvas.FortniteShop();
const image = await shop
.setToken(data.config.apiKeys.fortniteFNBR)
.setText("header", message.translate("general/fortniteshop:HEADER"))
.setText("daily", message.translate("general/fortniteshop:DAILY"))
.setText("featured", message.translate("general/fortniteshop:FEATURED"))
.setText("date", message.translate("general/fortniteshop:DATE", {
skipInterpolation: true
}).replace("{{date}}", "{date}"))
.setText("footer", message.translate("general/fortniteshop:FOOTER"))
.lang(momentName)
.toAttachment();
const attachment = new Discord.MessageAttachment(image, "shop.png");
const embed = new Discord.MessageEmbed()
.setAuthor({
name: message.translate("general/fortniteshop:HEADER", {
date: message.printDate(new Date(Date.now()))
}),
iconURL: this.client.user.displayAvatarURL({
size: 512,
dynamic: true,
format: "png"
})
})
.setImage("attachment://shop.png")
.setColor(data.config.embed.color)
.setFooter({
text: data.config.embed.footer
});
await message.channel.send({
embeds: [embed],
files: [attachment]
});
await m.delete();
return;
}
};
module.exports = Fortniteshop;

View file

@ -29,6 +29,7 @@ class Serverinfo extends Command {
}; };
await guild.members.fetch(); await guild.members.fetch();
const owner = await guild.fetchOwner();
const embed = new Discord.MessageEmbed() const embed = new Discord.MessageEmbed()
.setAuthor({ .setAuthor({
@ -48,8 +49,8 @@ class Serverinfo extends Command {
) )
.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"), owner.toString(), 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"), .addField(this.client.customEmojis.channels + message.translate("common:CHANNELS"),
`${guild.channels.cache.filter(c => c.type === "GUILD_TEXT").size} ${message.getNoun(guild.channels.cache.filter(c => c.type === "GUILD_TEXT").size, message.translate("misc:NOUNS:TEXT:1"), message.translate("misc:NOUNS:TEXT:2"), message.translate("misc:NOUNS:TEXT:5"))}` + `${guild.channels.cache.filter(c => c.type === "GUILD_TEXT").size} ${message.getNoun(guild.channels.cache.filter(c => c.type === "GUILD_TEXT").size, message.translate("misc:NOUNS:TEXT:1"), message.translate("misc:NOUNS:TEXT:2"), message.translate("misc:NOUNS:TEXT:5"))}` +
"\n" + `${guild.channels.cache.filter(c => c.type === "GUILD_VOICE").size} ${message.getNoun(guild.channels.cache.filter(c => c.type === "GUILD_VOICE").size, message.translate("misc:NOUNS:VOICE:1"), message.translate("misc:NOUNS:VOICE:2"), message.translate("misc:NOUNS:VOICE:5"))}` + "\n" + `${guild.channels.cache.filter(c => c.type === "GUILD_VOICE").size} ${message.getNoun(guild.channels.cache.filter(c => c.type === "GUILD_VOICE").size, message.translate("misc:NOUNS:VOICE:1"), message.translate("misc:NOUNS:VOICE:2"), message.translate("misc:NOUNS:VOICE:5"))}` +

View file

@ -24,7 +24,7 @@ class Announcement extends Command {
message.delete().catch(() => {}); message.delete().catch(() => {});
let mention = ""; let mention = null;
const msg = await message.sendT("moderation/announcement:MENTION_PROMPT"); const msg = await message.sendT("moderation/announcement:MENTION_PROMPT");
const filter = m => m.author.id === message.author.id; const filter = m => m.author.id === message.author.id;

View file

@ -1,53 +0,0 @@
const Command = require("../../base/Command.js"),
Discord = require("discord.js");
class Checkinvites extends Command {
constructor(client) {
super(client, {
name: "checkinvites",
dirname: __dirname,
enabled: true,
guildOnly: true,
aliases: ["checkinvite", "checkinv"],
memberPermissions: [],
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS"],
nsfw: false,
ownerOnly: false,
cooldown: 1000
});
}
async run(message, args, data) {
const withInvite = [];
message.guild.members.cache.forEach((m) => {
const possibleLinks = m.presence.activities.map((a) => [a.state, a.details, a.name]).flat();
const inviteLinks = possibleLinks.filter((l) => /(discord\.(gg|io|me|li)\/.+|discordapp\.com\/invite\/.+)/i.test(l));
if (inviteLinks.length > 0) {
withInvite.push({
id: m.user.id,
tag: Discord.Util.escapeMarkdown(m.user.tag),
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 embed = new Discord.MessageEmbed()
.setDescription(text)
.setColor(data.config.embed.color)
.setFooter({
text: data.config.embed.footer
});
const m = await message.channel.send({
embeds: [embed]
});
setTimeout(function () {
m.delete();
}, 3000);
}
};
module.exports = Checkinvites;

View file

@ -18,7 +18,7 @@ class Clearsanctions extends Command {
async run(message, args) { async run(message, args) {
const member = await this.client.resolveMember(args[0], message.guild); const member = await this.client.resolveMember(args[0], message.guild);
if (!member) return message.error("moderation/clear-sanctions:MISSING_MEMBER"); if (!member) return message.error("moderation/clearsanctions:MISSING_MEMBER");
const memberData = await this.client.findOrCreateMember({ const memberData = await this.client.findOrCreateMember({
id: member.id, id: member.id,
@ -26,7 +26,7 @@ class Clearsanctions extends Command {
}); });
memberData.sanctions = []; memberData.sanctions = [];
memberData.save(); memberData.save();
message.success("moderation/clear-sanctions:SUCCESS", { message.success("moderation/clearsanctions:SUCCESS", {
username: member.user.tag username: member.user.tag
}); });
} }

View file

@ -23,7 +23,7 @@ class Poll extends Command {
message.delete().catch(() => {}); message.delete().catch(() => {});
let mention = ""; let mention = null;
const msg = await message.sendT("moderation/announcement:MENTION_PROMPT"); const msg = await message.sendT("moderation/announcement:MENTION_PROMPT");
const filter = m => m.author.id === message.author.id; const filter = m => m.author.id === message.author.id;

View file

@ -55,7 +55,7 @@ class Warn extends Command {
const embed = new Discord.MessageEmbed() const embed = new Discord.MessageEmbed()
.addField(message.translate("common:USER"), `\`${member.user.tag}\` (${member.user.toString()})`) .addField(message.translate("common:USER"), `\`${member.user.tag}\` (${member.user.toString()})`)
.addField(message.translate("common:MODERATOR"), `\`${message.author.tag}\` (${message.author.toString()}`) .addField(message.translate("common:MODERATOR"), `\`${message.author.tag}\` (${message.author.toString()})`)
.addField(message.translate("common:REASON"), reason, true); .addField(message.translate("common:REASON"), reason, true);
if (banCount) { if (banCount) {

View file

@ -27,6 +27,16 @@ class Np extends Command {
// Gets the current song // Gets the current song
const track = queue.songs[0]; const track = queue.songs[0];
const status = queue =>
`Фильтры: \`${queue.filters.join(", ")
|| "Выкл"}\` | Повтор: \`${
queue.repeatMode
? queue.repeatMode === 2
? "Очереди"
: "Текущей песни"
: "Выкл"
}\` | Автовоспроизведение: \`${queue.autoplay ? "Вкл" : "Выкл"}\``;
// Generate discord embed to display song informations // Generate discord embed to display song informations
const embed = new Discord.MessageEmbed() const embed = new Discord.MessageEmbed()
.setAuthor({ .setAuthor({
@ -36,6 +46,7 @@ class Np extends Command {
.addField(message.translate("music/np:T_TITLE"), `[${track.name}](${track.url})`) .addField(message.translate("music/np:T_TITLE"), `[${track.name}](${track.url})`)
.addField(message.translate("music/np:T_CHANNEL"), track.uploader.name ? track.uploader.name : "Отсутствует") .addField(message.translate("music/np:T_CHANNEL"), track.uploader.name ? track.uploader.name : "Отсутствует")
.addField(message.translate("music/np:T_DURATION"), `${queue.formattedCurrentTime} / ${track.formattedDuration}`) .addField(message.translate("music/np:T_DURATION"), `${queue.formattedCurrentTime} / ${track.formattedDuration}`)
.addField(message.translate("music/np:T_CONF"), status(queue))
.setColor(data.config.embed.color) .setColor(data.config.embed.color)
.setFooter({ .setFooter({
text: data.config.embed.footer text: data.config.embed.footer

View file

@ -20,7 +20,7 @@ class Seek extends Command {
async run(message, args) { async run(message, args) {
const voice = message.member.voice.channel; const voice = message.member.voice.channel;
const queue = this.client.player.getQueue(message); const queue = this.client.player.getQueue(message);
const time = ms(args[0]); const time = ms(args[0]) / 1000;
if (!voice) return message.error("music/play:NO_VOICE_CHANNEL"); if (!voice) return message.error("music/play:NO_VOICE_CHANNEL");
if (!queue) return message.error("music/play:NOT_PLAYING"); if (!queue) return message.error("music/play:NOT_PLAYING");

View file

@ -25,7 +25,9 @@ class Reload extends Command {
await this.client.unloadCommand(cmd.conf.location, cmd.help.name); await this.client.unloadCommand(cmd.conf.location, cmd.help.name);
await this.client.loadCommand(cmd.conf.location, cmd.help.name); await this.client.loadCommand(cmd.conf.location, cmd.help.name);
i18next.reloadResources(data.guild.language); const lang = data.guild.language || "ru-RU";
i18next.reloadResources(lang);
message.success("owner/reload:SUCCESS", { message.success("owner/reload:SUCCESS", {
command: cmd.help.name command: cmd.help.name
}); });

View file

@ -123,9 +123,6 @@ router.post("/:serverID", CheckAuth, async(req, res) => {
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;
else guildData.plugins.fortniteshop = guild.channels.cache.find((ch) => "#" + ch.name === data.fortniteshop).id;
if (data.birthdays === req.translate("common:NO_CHANNEL")) guildData.plugins.birthdays = false; if (data.birthdays === req.translate("common:NO_CHANNEL")) guildData.plugins.birthdays = false;
else guildData.plugins.birthdays = guild.channels.cache.find((ch) => "#" + ch.name === data.birthdays).id; else guildData.plugins.birthdays = guild.channels.cache.find((ch) => "#" + ch.name === data.birthdays).id;

View file

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

View file

@ -34,10 +34,6 @@ module.exports = class {
const checkReminds = require("../helpers/checkReminds"); const checkReminds = require("../helpers/checkReminds");
checkReminds.init(client); checkReminds.init(client);
// DAILY SHOP FORTNITE
const fortniteShop = require("../helpers/fortniteShop");
fortniteShop.init(client);
// Start the dashboard // Start the dashboard
if (client.config.dashboard.enabled) client.dashboard.load(client); if (client.config.dashboard.enabled) client.dashboard.load(client);

View file

@ -32,7 +32,7 @@ module.exports = {
.addField(client.translate("common:MESSAGE"), r.message) .addField(client.translate("common:MESSAGE"), r.message)
.setColor(client.config.embed.color) .setColor(client.config.embed.color)
.setFooter({ text: client.config.embed.footer }); .setFooter({ text: client.config.embed.footer });
dUser.send(embed); dUser.send({ embeds: [embed] });
}); });
user.reminds = user.reminds.filter((r) => r.sendAt >= dateNow); user.reminds = user.reminds.filter((r) => r.sendAt >= dateNow);
user.save(); user.save();

View file

@ -35,7 +35,7 @@ module.exports = {
guild.data = guildData; guild.data = guildData;
if (member) { if (member) {
guild.channels.cache.forEach((channel) => { guild.channels.cache.forEach((channel) => {
const permOverwrites = channel.permissionOverwrites.get(member.id); const permOverwrites = channel.permissionOverwrites.cache.get(member.id);
if (permOverwrites) permOverwrites.delete(); if (permOverwrites) permOverwrites.delete();
}); });
}; };
@ -47,7 +47,7 @@ module.exports = {
count: memberData.mute.case count: memberData.mute.case
})) }))
.setColor("#f44271") .setColor("#f44271")
.setFooter({ text: data.config.embed.footer }); .setFooter({ text: guild.client.config.embed.footer });
const channel = guild.channels.cache.get(guildData.plugins.modlogs); const channel = guild.channels.cache.get(guildData.plugins.modlogs);
if (channel) channel.send({ embeds: [embed] }); if (channel) channel.send({ embeds: [embed] });

View file

@ -1,46 +0,0 @@
const Canvas = require("discord-canvas"),
CronJob = require("cron").CronJob,
Discord = require("discord.js");
async function init(client) {
new CronJob("0 0 12 * * *", async function () {
if (!client.config.apiKeys.fortniteFNBR || client.config.apiKeys.fortniteFNBR === "") return;
client.guilds.cache.forEach(async (guild) => {
const guildData = await client.findOrCreateGuild({
id: guild.id
});
if (guildData.plugins.fortniteshop) {
const fnChannel = client.channels.cache.get(guildData.plugins.fortniteshop);
if (fnChannel) {
const momentName = client.languages.find((language) => language.name === guildData.language || language.aliases.includes(guildData.language)).moment;
const image = await new Canvas.FortniteShop()
.setToken(client.config.apiKeys.fortniteFNBR)
.setText("header", client.translate("general/fortniteshop:HEADER").replace("{{date}}", "{date}"), null, guildData.language)
.setText("daily", client.translate("general/fortniteshop:DAILY"), null, guildData.language)
.setText("featured", client.translate("general/fortniteshop:FEATURED"), null, guildData.language)
.setText("date", client.translate("general/fortniteshop:DATE", {
skipInterpolation: true
}, null, guildData.language).replace("{{date}}", "{date}"))
.setText("footer", client.translate("general/fortniteshop:FOOTER"), null, guildData.language)
.lang(momentName)
.toAttachment();
const attachment = new Discord.MessageAttachment(image, "shop.png");
const embed = new Discord.MessageEmbed()
.setAuthor({ name: client.translate("general/fortniteshop:DATE", {
date: client.printDate(new Date(Date.now()), null, guildData.language)
}, guildData.language), iconURL: client.user.displayAvatarURL()})
.setImage("attachment://shop.png")
.setColor(client.config.embed.color)
.setFooter({ text: client.config.embed.footer });
const msg = await fnChannel.send({ embeds: [embed] });
await msg.react("😍");
await msg.react("😐");
await msg.react("😭");
};
};
});
}, null, true, "Europe/Moscow");
};
module.exports = { init };

View file

@ -23,7 +23,19 @@ if (config.apiKeys.sentryDSN) {
// Load JaBa class // Load JaBa class
const JaBa = require("./base/JaBa"); const JaBa = require("./base/JaBa");
const client = new JaBa({ const client = new JaBa({
intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MEMBERS, Intents.FLAGS.GUILD_BANS, Intents.FLAGS.GUILD_EMOJIS_AND_STICKERS, Intents.FLAGS.GUILD_INVITES, Intents.FLAGS.GUILD_VOICE_STATES, Intents.FLAGS.GUILD_PRESENCES, Intents.FLAGS.GUILD_MESSAGES, Intents.FLAGS.GUILD_MESSAGE_REACTIONS, Intents.FLAGS.GUILD_MESSAGE_TYPING, Intents.FLAGS.DIRECT_MESSAGES], intents: [
Intents.FLAGS.GUILDS,
Intents.FLAGS.GUILD_MEMBERS,
Intents.FLAGS.GUILD_BANS,
Intents.FLAGS.GUILD_EMOJIS_AND_STICKERS,
Intents.FLAGS.GUILD_INVITES,
Intents.FLAGS.GUILD_VOICE_STATES,
Intents.FLAGS.GUILD_PRESENCES,
Intents.FLAGS.GUILD_MESSAGES,
Intents.FLAGS.GUILD_MESSAGE_REACTIONS,
Intents.FLAGS.GUILD_MESSAGE_TYPING,
Intents.FLAGS.DIRECT_MESSAGES,
],
partials: ["CHANNEL"] partials: ["CHANNEL"]
}); });

View file

@ -17,7 +17,6 @@
"SPECIAL_CHANNELS": "Special channels", "SPECIAL_CHANNELS": "Special channels",
"MODLOGS": "Moderation logs: *{{channel}}*", "MODLOGS": "Moderation logs: *{{channel}}*",
"BIRTHDAYS": "Birthdays announcements: *{{channel}}*", "BIRTHDAYS": "Birthdays announcements: *{{channel}}*",
"FORTNITESHOP": "Fortnite daily shop: *{{channel}}*",
"SUGGESTIONS": "Suggestions: *{{channel}}*", "SUGGESTIONS": "Suggestions: *{{channel}}*",
"REPORTS": "Reports: *{{channel}}*", "REPORTS": "Reports: *{{channel}}*",
"AUTOMOD_TITLE": "Auto-moderation:", "AUTOMOD_TITLE": "Auto-moderation:",

View file

@ -1,7 +0,0 @@
{
"DESCRIPTION": "Set the daily Fortnite shop channel!",
"USAGE": "{{prefix}}setfortniteshop (#channel)",
"EXAMPLES": "{{prefix}}setfortniteshop #shop\n{{prefix}}setfortniteshop",
"DISABLED": "Daily Fortnite shop disabled!",
"ENABLED": "Daily Fortnite shop enabled in {{channel}}!"
}

View file

@ -56,7 +56,6 @@
"UPDATE": "Update", "UPDATE": "Update",
"SUGGESTIONS": "Suggestions", "SUGGESTIONS": "Suggestions",
"MODLOGS": "Moderation logs", "MODLOGS": "Moderation logs",
"FORTNITESHOP": "Fortnite shop",
"NO_CHANNEL": "No channel", "NO_CHANNEL": "No channel",
"REPORTS": "Reports", "REPORTS": "Reports",
"BIRTHDAYS": "Birthdays", "BIRTHDAYS": "Birthdays",

View file

@ -1,21 +0,0 @@
{
"DESCRIPTION": "Shows a player's Fortnite stats!",
"USAGE": "{{prefix}}fortnite [psn/xbl/pc] [pseudo]",
"EXAMPLES": "{{prefix}}fortnite pc Ninja",
"MISSING_PLATFORM": "Please specify a platform between `psn`, `pc` or `xbl`!",
"MISSING_USERNAME": "Please enter a valid epic games username!",
"NOT_FOUND": "`{{search}}` was not found on `{{platform}}`!",
"TITLE": "{{username}} Fortnite Stats",
"AVERAGE_KILLS": "KILLS/MATCH",
"AVERAGE_KILL": "KILL/MATCH",
"W_PERCENT": "W%",
"WIN_PERCENT": "WIN%",
"KD": "KD",
"WINS": "Wins",
"WIN": "Win",
"MATCHES": "Matches",
"MATCH": "Match",
"KILLS": "Kills",
"KILL": "Kill",
"FOOTER": "By JaBa using fortnitetracker.com"
}

View file

@ -1,10 +0,0 @@
{
"DESCRIPTION": "Shows the daily fortnite items shop!",
"USAGE": "{{prefix}}fortniteshop",
"EXAMPLES": "{{prefix}}fortniteshop",
"HEADER": "FORTNITE ITEMS SHOP",
"DAILY": "DAILY",
"FEATURED": "FEATURED",
"DATE": "{{date}} Fortnite shop",
"FOOTER": "Fortnite Shop by JaBa"
}

View file

@ -7,7 +7,7 @@
"NO_BACKUP_FOUND": "Резервных копий с ID `{{backupID}}` не найдено", "NO_BACKUP_FOUND": "Резервных копий с ID `{{backupID}}` не найдено",
"TIMES_UP": "Время вышло! Используйте команду снова!", "TIMES_UP": "Время вышло! Используйте команду снова!",
"SUCCESS_PUBLIC": "Резервная копия успешно создана! ID резервной копии был отправлен вам в ЛС!", "SUCCESS_PUBLIC": "Резервная копия успешно создана! ID резервной копии был отправлен вам в ЛС!",
"SUCCESS_PRIVATE": "Вот ID вашей резервной копии: `{{backupID}}`, используйте его для восстановления на другом сервере!", "SUCCESS_PRIVATE": "Вот ID вашей резервной копии: **`{{backupID}}`**, используйте его для восстановления на другом сервере!",
"CONFIRMATION": ":warning: | **Загрузка резервной копии заменит настройки текущего сервера.**\n\n:arrow_right_hook: *Отправьте `confirm` для подтверждения!*", "CONFIRMATION": ":warning: | **Загрузка резервной копии заменит настройки текущего сервера.**\n\n:arrow_right_hook: *Отправьте `confirm` для подтверждения!*",
"REMOVE_CONFIRMATION": ":warning: | **Вы уверены что хотите удалить резервную копию? Это действие необратимо**\n\n:arrow_right_hook: *Отправьте `confirm` для подтверждения!*", "REMOVE_CONFIRMATION": ":warning: | **Вы уверены что хотите удалить резервную копию? Это действие необратимо**\n\n:arrow_right_hook: *Отправьте `confirm` для подтверждения!*",
"SUCCESS_REMOVED": "Резервная копия успешно удалена!", "SUCCESS_REMOVED": "Резервная копия успешно удалена!",

View file

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

View file

@ -4,7 +4,7 @@
"EXAMPLES": "{{prefix}}set level @Jonny_Bro#4226 10", "EXAMPLES": "{{prefix}}set level @Jonny_Bro#4226 10",
"INVALID_MEMBER": "Вы должны упомянуть пользователя!", "INVALID_MEMBER": "Вы должны упомянуть пользователя!",
"NO_STATUS": "Выберите параметр: `level`, `xp`, `credits` или `bank`", "NO_STATUS": "Выберите параметр: `level`, `xp`, `credits` или `bank`",
"BOT_USER": "У ботов нет профиля!", "BOT_USER": "Вы не можете изменить статистику бота!",
"INVALID_AMOUNT": "Укажите новое значение!", "INVALID_AMOUNT": "Укажите новое значение!",
"SUCCESS_LEVEL": "Уровень пользователя **{{username}}** изменён на **{{amount}}**!", "SUCCESS_LEVEL": "Уровень пользователя **{{username}}** изменён на **{{amount}}**!",
"SUCCESS_XP": "XP пользователя **{{username}}** изменён на **{{amount}}**!", "SUCCESS_XP": "XP пользователя **{{username}}** изменён на **{{amount}}**!",

View file

@ -1,7 +0,0 @@
{
"DESCRIPTION": "Установить канал для ежедневного Fortnite магазина!",
"USAGE": "{{prefix}}setfortniteshop (#канал)",
"EXAMPLES": "{{prefix}}setfortniteshop #магазин\n{{prefix}}setfortniteshop",
"ENABLED": "Ежедневный Fortnite магазин включён в {{channel}}!",
"DISABLED": "Ежедневный Fortnite магазин отключён!"
}

View file

@ -56,7 +56,6 @@
"UPDATE": "Обновить", "UPDATE": "Обновить",
"SUGGESTIONS": "Предложения", "SUGGESTIONS": "Предложения",
"MODLOGS": "Логи модерации", "MODLOGS": "Логи модерации",
"FORTNITESHOP": "Магазин Fortnite",
"NO_CHANNEL": "Канал не выбран", "NO_CHANNEL": "Канал не выбран",
"REPORTS": "Жалобы", "REPORTS": "Жалобы",
"BIRTHDAYS": "Поздравления с днём рождения", "BIRTHDAYS": "Поздравления с днём рождения",

View file

@ -6,6 +6,6 @@
"BOT_USER": "Ботам не нужны деньги!", "BOT_USER": "Ботам не нужны деньги!",
"YOURSELF": "Вы не можете заплатить самому себе!", "YOURSELF": "Вы не можете заплатить самому себе!",
"INVALID_AMOUNT": "Укажите сумму", "INVALID_AMOUNT": "Укажите сумму",
"ENOUGH_MONEY": "У вас нет **{{amount}}**", "ENOUGH_MONEY": "У вас нет {{amount}}",
"SUCCESS": "Вы отправили **{{amount}}** пользователю **{{username}}**!" "SUCCESS": "Вы отправили {{amount}} пользователю **{{username}}**!"
} }

View file

@ -2,6 +2,7 @@
"DESCRIPTION": "Попытаться ограбить пользователя!", "DESCRIPTION": "Попытаться ограбить пользователя!",
"USAGE": "{{prefix}}rob [@пользователь] [сумма]", "USAGE": "{{prefix}}rob [@пользователь] [сумма]",
"EXAMPLES": "{{prefix}}rob @Jonny_Bro#4226 100", "EXAMPLES": "{{prefix}}rob @Jonny_Bro#4226 100",
"BOT_USER": "Вы не можете ограбить бота!",
"YOURSELF": "Вы не можете ограбить себя!", "YOURSELF": "Вы не можете ограбить себя!",
"MISSING_MEMBER": "Вы должны упомянуть пользователя!", "MISSING_MEMBER": "Вы должны упомянуть пользователя!",
"MISSING_AMOUNT": "Укажите сумму!", "MISSING_AMOUNT": "Укажите сумму!",
@ -9,7 +10,7 @@
"NOT_ENOUGH_MEMBER": "Вы не можете ограбить **{{username}}**, потому что у него нет с собой столько кредитов!", "NOT_ENOUGH_MEMBER": "Вы не можете ограбить **{{username}}**, потому что у него нет с собой столько кредитов!",
"COOLDOWN": "🕵️ **{{username}}** под защитой.... Попробуйте позже!", "COOLDOWN": "🕵️ **{{username}}** под защитой.... Попробуйте позже!",
"ROB_WON_1": "🎉 | Поздравляем! Полиция не смогла остановить вас, поэтому вы успешно украли **{{money}}** у **{{username}}**!", "ROB_WON_1": "🎉 | Поздравляем! Полиция не смогла остановить вас, поэтому вы успешно украли **{{money}}** у **{{username}}**!",
"ROB_WON_2": "😕 | **{{username}}**, вы ограбили **{{username}}** на **{{money}}**", "ROB_WON_2": "😕 | Вы ограбили **{{username}}** на **{{money}}**",
"ROB_LOSE_1": "🚔 | Полиция поймала вас. Теперь вы должны заплатить **{{fine}}**. **{{offset}}** будет выплачено **{{username}}**.", "ROB_LOSE_1": "🚔 | Полиция поймала вас. Теперь вы должны заплатить **{{fine}}**. **{{offset}}** будет выплачено **{{username}}**.",
"ROB_LOSE_2": "🚓 | Плохие новости... **{{username}}** вовремя позвонил в полицию. Вы должны заплатить **{{fine}}** и **{{offset}}** будет выплачено **{{username}}**." "ROB_LOSE_2": "🚓 | Плохие новости... **{{username}}** вовремя позвонил в полицию. Вы должны заплатить **{{fine}}** и **{{offset}}** будет выплачено **{{username}}**."
} }

View file

@ -1,5 +1,5 @@
{ {
"DESCRIPTION": "Превратить текст в ASCII код!", "DESCRIPTION": "Превратить текст в ASCII код!\nПоддерживаются только английские буквы и цифры!",
"USAGE": "{{prefix}}ascii [текст]", "USAGE": "{{prefix}}ascii [текст]",
"EXAMPLES": "{{prefix}}ascii Hello world!", "EXAMPLES": "{{prefix}}ascii Hello world!",
"TEXT_MISSING": "Введите текст (не больше 20 символов)!" "TEXT_MISSING": "Введите текст (не больше 20 символов)!"

View file

@ -1,21 +0,0 @@
{
"DESCRIPTION": "Показать статистику игрока Fortnite!",
"USAGE": "{{prefix}}fortnite [PSN/XBL/PC] [ник]",
"EXAMPLES": "{{prefix}}fortnite PC Ninja",
"MISSING_PLATFORM": "Выберите платформу: `PSN`, `PC` или `XBL` (без учёта регистра)!",
"MISSING_USERNAME": "Укажите ник в Epic Games!",
"NOT_FOUND": "`{{search}}` не найден на платформе `{{platform}}`!",
"TITLE": "Статистика игрока {{username}}",
"AVERAGE_KILLS": "Убийства/Матч",
"AVERAGE_KILL": "Убийство/Матч",
"W_PERCENT": "% Побед",
"WIN_PERCENT": "% Побед",
"KD": "КД",
"WINS": "Побед(а/ы)",
"WIN": "Победа",
"MATCHES": "Матч(а/ей)",
"MATCH": "Матч",
"KILLS": "Убийств(о/а)",
"KILL": "Убийство",
"FOOTER": "JaBA | fortnitetracker.com"
}

View file

@ -1,10 +0,0 @@
{
"DESCRIPTION": "Показать ежедневный магазин Fortnite!",
"USAGE": "{{prefix}}fortniteshop",
"EXAMPLES": "{{prefix}}fortniteshop",
"HEADER": "Магазин предметов FORTNITE",
"DAILY": "Ежедневное",
"FEATURED": "Предлагаемые",
"DATE": "Магазин от {{date}}",
"FOOTER": "JaBa | Магазин Fortnite"
}

View file

@ -1,6 +0,0 @@
{
"DESCRIPTION": "Проверить пользователей на наличие ссылок-приглашений в статусе!",
"USAGE": "{{prefix}}checkinvites",
"EXAMPLES": "{{prefix}}checkinvites",
"NOBODY": "Ни у кого нет ссылок-приглашений в статусе!"
}

View file

@ -1,7 +1,7 @@
{ {
"DESCRIPTION": "Разбранить пользователя на сервере!", "DESCRIPTION": "Разбранить пользователя на сервере!",
"USAGE": "{{prefix}}unban [ID/пользователь#1234]", "USAGE": "{{prefix}}unban [ID]",
"EXAMPLES": "{{prefix}}unban 281361531411890186\n{{prefix}}unban Jonny_Bro#4226", "EXAMPLES": "{{prefix}}unban 281361531411890186",
"MISSING_ID": "Укажите ID пользователя!", "MISSING_ID": "Укажите ID пользователя!",
"NOT_BANNED": "**{{username}}** не забанен!", "NOT_BANNED": "**{{username}}** не забанен!",
"UNBANNED": "**{{username}}** был разбанен на сервере **{{server}}**!" "UNBANNED": "**{{username}}** был разбанен на сервере **{{server}}**!"

View file

@ -6,6 +6,7 @@
"T_TITLE": "Название", "T_TITLE": "Название",
"T_CHANNEL": "Канал", "T_CHANNEL": "Канал",
"T_DURATION": "Длительность", "T_DURATION": "Длительность",
"T_CONF": "Настройки",
"T_DESCRIPTION": "Описание", "T_DESCRIPTION": "Описание",
"NO_DESCRIPTION": "Описание отсутствует" "NO_DESCRIPTION": "Описание отсутствует"
} }

View file

@ -1,7 +1,7 @@
{ {
"DESCRIPTION": "Перемотать вперед или назад на данное время в текущем треке!", "DESCRIPTION": "Перемотать вперед или назад на данное время в текущем треке!",
"USAGE": "{{prefix}}seek [время]", "USAGE": "{{prefix}}seek [время]",
"EXAMPLES": "{{prefix}}resume 10s\n{{prefix}}resume -10s", "EXAMPLES": "{{prefix}}seek 10s\n{{prefix}}seek -10s",
"INVALID_TIME": "Укажите время!", "INVALID_TIME": "Укажите время!",
"SUCCESS": "▶️ Трек перемотан!" "SUCCESS": "▶️ Трек перемотан!"
} }

View file

@ -5,7 +5,7 @@
"INVALID_MEMBER": "Вы должны упомянуть пользователя!", "INVALID_MEMBER": "Вы должны упомянуть пользователя!",
"NO_ACTION": "Выберите действие: `set` или `add`!", "NO_ACTION": "Выберите действие: `set` или `add`!",
"NO_STATUS": "Выберите параметр: `level`, `xp`, `credits`, `rep` или `bank`!", "NO_STATUS": "Выберите параметр: `level`, `xp`, `credits`, `rep` или `bank`!",
"BOT_USER": "У ботов нет профиля!", "BOT_USER": "Вы не можете изменить статистику бота!",
"INVALID_AMOUNT": "Укажите новое значение!", "INVALID_AMOUNT": "Укажите новое значение!",
"SUCCESS_LEVEL": "Уровень пользователя **{{username}}** изменён на **{{amount}}**!", "SUCCESS_LEVEL": "Уровень пользователя **{{username}}** изменён на **{{amount}}**!",
"SUCCESS_XP": "XP пользователя **{{username}}** изменён на **{{amount}}**!", "SUCCESS_XP": "XP пользователя **{{username}}** изменён на **{{amount}}**!",

View file

@ -3,5 +3,5 @@
"USAGE": "{{prefix}}reload", "USAGE": "{{prefix}}reload",
"EXAMPLES": "{{prefix}}reload help", "EXAMPLES": "{{prefix}}reload help",
"NOT_FOUND": "Команды `{{search}}` не существует!", "NOT_FOUND": "Команды `{{search}}` не существует!",
"SUCCESS": "Команда успешно перезагружена!" "SUCCESS": "Команда `{{command}}` успешно перезагружена!"
} }

View file

@ -42,7 +42,6 @@
"express-session": "^1.17.0", "express-session": "^1.17.0",
"ffmpeg-static": "^4.4.0", "ffmpeg-static": "^4.4.0",
"figlet": "^1.5.0", "figlet": "^1.5.0",
"fortnite": "^4.3.2",
"gamedig": "^3.0.0", "gamedig": "^3.0.0",
"i18next": "^20.2.2", "i18next": "^20.2.2",
"i18next-node-fs-backend": "^2.1.3", "i18next-node-fs-backend": "^2.1.3",

View file

@ -112,21 +112,6 @@ const checks = [
success("Valid DBL key"); success("Valid DBL key");
}; };
}; };
if (!config.apiKeys.fortniteFNBR) {
ignore("fortniteFNBR API is not configured, key should not be checked.");
} else {
const res = await fetch("https://fnbr.co/api/stats", {
headers: {
"x-api-key": config.apiKeys.fortniteFNBR
}
});
const result = await res.json();
if (result.status && result.status === 401) {
error("Should be a valid FNBR key", "get your key here: https://fnbr.co/api/docs");
} else {
success("Valid FNBR key");
};
};
if (!config.apiKeys.sentryDSN) { if (!config.apiKeys.sentryDSN) {
ignore("SentryDSN is not configured, key should not be checked."); ignore("SentryDSN is not configured, key should not be checked.");
} else { } else {