mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-22 05:04:58 +05:00
Фикс всех найденых ошибок
This commit is contained in:
parent
337a3f1efb
commit
50f84d317b
53 changed files with 97 additions and 519 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -6,10 +6,6 @@ node_modules
|
|||
package-lock.json
|
||||
yarn.lock
|
||||
|
||||
# Fortnite Shop images
|
||||
assets/img/fortnite/shop/**/*.png
|
||||
!assets/img/fortnite/shop/**/example-shop.png
|
||||
|
||||
# DB
|
||||
giveaways.json
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
# JaBa-new
|
||||
# JaBa
|
||||
|
|
|
@ -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
|
||||
birthdays: false, // the channel in which birtdays announcements 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
|
||||
}},
|
||||
slowmode: { type: Object, default: { // Servers slowmode
|
||||
|
|
|
@ -108,10 +108,12 @@ userSchema.method("getAchievements", async function() {
|
|||
await Canvas.loadImage(`./assets/img/achievements/achievement${this.achievements.invite.achieved ? "_colored" : ""}7.png`)
|
||||
];
|
||||
let dim = 0;
|
||||
|
||||
for (let i = 0; i < images.length; i++) {
|
||||
await ctx.drawImage(images[i], dim, 10, 350, 200);
|
||||
dim += 200;
|
||||
};
|
||||
|
||||
return canvas.toBuffer();
|
||||
});
|
||||
|
||||
|
|
|
@ -66,9 +66,6 @@ class Configuration extends Command {
|
|||
}) + "\n" +
|
||||
message.translate("administration/configuration:BIRTHDAYS", {
|
||||
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")
|
||||
})
|
||||
);
|
||||
|
||||
|
|
|
@ -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;
|
|
@ -18,6 +18,15 @@ class Achievements extends Command {
|
|||
}
|
||||
|
||||
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()
|
||||
.setAuthor({
|
||||
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", {
|
||||
now: data.userData.achievements.firstCommand.progress.now,
|
||||
total: data.userData.achievements.firstCommand.progress.total,
|
||||
percent: Math.round(100 * (data.userData.achievements.firstCommand.progress.now / data.userData.achievements.firstCommand.progress.total))
|
||||
now: userData.achievements.firstCommand.progress.now,
|
||||
total: 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", {
|
||||
now: data.userData.achievements.work.progress.now,
|
||||
total: data.userData.achievements.work.progress.total,
|
||||
percent: Math.round(100 * (data.userData.achievements.work.progress.now / data.userData.achievements.work.progress.total))
|
||||
now: userData.achievements.work.progress.now,
|
||||
total: 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", {
|
||||
now: data.userData.achievements.married.progress.now,
|
||||
total: data.userData.achievements.married.progress.total,
|
||||
percent: Math.round(100 * (data.userData.achievements.married.progress.now / data.userData.achievements.married.progress.total))
|
||||
now: userData.achievements.married.progress.now,
|
||||
total: 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", {
|
||||
now: data.userData.achievements.slots.progress.now,
|
||||
total: data.userData.achievements.slots.progress.total,
|
||||
percent: Math.round(100 * (data.userData.achievements.slots.progress.now / data.userData.achievements.slots.progress.total))
|
||||
now: userData.achievements.slots.progress.now,
|
||||
total: 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", {
|
||||
now: data.userData.achievements.tip.progress.now,
|
||||
total: data.userData.achievements.tip.progress.total,
|
||||
percent: Math.round(100 * (data.userData.achievements.tip.progress.now / data.userData.achievements.tip.progress.total))
|
||||
now: userData.achievements.tip.progress.now,
|
||||
total: 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", {
|
||||
now: data.userData.achievements.rep.progress.now,
|
||||
total: data.userData.achievements.rep.progress.total,
|
||||
percent: Math.round(100 * (data.userData.achievements.rep.progress.now / data.userData.achievements.rep.progress.total))
|
||||
now: userData.achievements.rep.progress.now,
|
||||
total: 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", {
|
||||
now: data.userData.achievements.invite.progress.now,
|
||||
total: data.userData.achievements.invite.progress.total,
|
||||
percent: Math.round(100 * (data.userData.achievements.invite.progress.now / data.userData.achievements.invite.progress.total))
|
||||
now: userData.achievements.invite.progress.now,
|
||||
total: userData.achievements.invite.progress.total,
|
||||
percent: Math.round(100 * (userData.achievements.invite.progress.now / userData.achievements.invite.progress.total))
|
||||
}));
|
||||
|
||||
message.channel.send({
|
||||
|
|
|
@ -27,7 +27,7 @@ class Pay extends Command {
|
|||
|
||||
const amount = Math.ceil(parseInt(sentAmount, 10));
|
||||
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({
|
||||
|
@ -42,7 +42,7 @@ class Pay extends Command {
|
|||
memberData.save();
|
||||
|
||||
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
|
||||
});
|
||||
}
|
||||
|
|
|
@ -82,12 +82,14 @@ class Profile extends Command {
|
|||
}) // Sets the footer of the embed
|
||||
.setTimestamp();
|
||||
|
||||
const buffer = userData.getAchievements();
|
||||
const buffer = await userData.getAchievements();
|
||||
|
||||
message.channel.send({
|
||||
embeds: [profileEmbed],
|
||||
// files: [{
|
||||
// attachment: buffer
|
||||
// }]
|
||||
files: [{
|
||||
name: "achievements.png",
|
||||
attachment: buffer
|
||||
}]
|
||||
}); // Send the embed in the current channel
|
||||
}
|
||||
};
|
||||
|
|
|
@ -83,7 +83,7 @@ class Work extends Command {
|
|||
data.memberData.save();
|
||||
|
||||
const messageOptions = {
|
||||
emdeds: embed
|
||||
embeds: [embed]
|
||||
};
|
||||
if (!data.userData.achievements.work.achieved) {
|
||||
data.userData.achievements.work.progress.now += 1;
|
||||
|
|
|
@ -68,8 +68,9 @@ class Number extends Command {
|
|||
});
|
||||
userdata.money = userdata.money + won;
|
||||
userdata.save();
|
||||
collector.stop(msg.author.username);
|
||||
};
|
||||
|
||||
collector.stop();
|
||||
};
|
||||
if (parseInt(msg.content) < number) message.error("fun/number:BIG", {
|
||||
user: msg.author.toString(),
|
||||
|
|
|
@ -6,7 +6,7 @@ class TicTacToe extends Command {
|
|||
super(client, {
|
||||
name: "tictactoe",
|
||||
dirname: __dirname,
|
||||
enabled: true,
|
||||
enabled: false,
|
||||
guildOnly: false,
|
||||
aliases: ["ttt"],
|
||||
memberPermissions: [],
|
||||
|
|
|
@ -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;
|
|
@ -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;
|
|
@ -29,6 +29,7 @@ class Serverinfo extends Command {
|
|||
};
|
||||
|
||||
await guild.members.fetch();
|
||||
const owner = await guild.fetchOwner();
|
||||
|
||||
const embed = new Discord.MessageEmbed()
|
||||
.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.id + message.translate("common:ID"), guild.id, 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.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.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"))}` +
|
||||
"\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"))}` +
|
||||
|
|
|
@ -24,7 +24,7 @@ class Announcement extends Command {
|
|||
|
||||
message.delete().catch(() => {});
|
||||
|
||||
let mention = "";
|
||||
let mention = null;
|
||||
const msg = await message.sendT("moderation/announcement:MENTION_PROMPT");
|
||||
|
||||
const filter = m => m.author.id === message.author.id;
|
||||
|
|
|
@ -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;
|
|
@ -18,7 +18,7 @@ class Clearsanctions extends Command {
|
|||
|
||||
async run(message, args) {
|
||||
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({
|
||||
id: member.id,
|
||||
|
@ -26,7 +26,7 @@ class Clearsanctions extends Command {
|
|||
});
|
||||
memberData.sanctions = [];
|
||||
memberData.save();
|
||||
message.success("moderation/clear-sanctions:SUCCESS", {
|
||||
message.success("moderation/clearsanctions:SUCCESS", {
|
||||
username: member.user.tag
|
||||
});
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ class Poll extends Command {
|
|||
|
||||
message.delete().catch(() => {});
|
||||
|
||||
let mention = "";
|
||||
let mention = null;
|
||||
const msg = await message.sendT("moderation/announcement:MENTION_PROMPT");
|
||||
|
||||
const filter = m => m.author.id === message.author.id;
|
||||
|
|
|
@ -55,7 +55,7 @@ class Warn extends Command {
|
|||
|
||||
const embed = new Discord.MessageEmbed()
|
||||
.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);
|
||||
|
||||
if (banCount) {
|
||||
|
|
|
@ -27,6 +27,16 @@ class Np extends Command {
|
|||
// Gets the current song
|
||||
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
|
||||
const embed = new Discord.MessageEmbed()
|
||||
.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_CHANNEL"), track.uploader.name ? track.uploader.name : "Отсутствует")
|
||||
.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)
|
||||
.setFooter({
|
||||
text: data.config.embed.footer
|
||||
|
|
|
@ -20,7 +20,7 @@ class Seek extends Command {
|
|||
async run(message, args) {
|
||||
const voice = message.member.voice.channel;
|
||||
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 (!queue) return message.error("music/play:NOT_PLAYING");
|
||||
|
|
|
@ -25,7 +25,9 @@ class Reload extends Command {
|
|||
await this.client.unloadCommand(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", {
|
||||
command: cmd.help.name
|
||||
});
|
||||
|
|
|
@ -123,9 +123,6 @@ router.post("/:serverID", CheckAuth, async(req, res) => {
|
|||
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;
|
||||
|
||||
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;
|
||||
else guildData.plugins.birthdays = guild.channels.cache.find((ch) => "#" + ch.name === data.birthdays).id;
|
||||
|
||||
|
|
|
@ -167,24 +167,6 @@
|
|||
<% } %>
|
||||
</select>
|
||||
</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>
|
||||
<!-- /.box-body -->
|
||||
<div class="box-footer">
|
||||
|
|
|
@ -34,10 +34,6 @@ module.exports = class {
|
|||
const checkReminds = require("../helpers/checkReminds");
|
||||
checkReminds.init(client);
|
||||
|
||||
// DAILY SHOP FORTNITE
|
||||
const fortniteShop = require("../helpers/fortniteShop");
|
||||
fortniteShop.init(client);
|
||||
|
||||
// Start the dashboard
|
||||
if (client.config.dashboard.enabled) client.dashboard.load(client);
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ module.exports = {
|
|||
.addField(client.translate("common:MESSAGE"), r.message)
|
||||
.setColor(client.config.embed.color)
|
||||
.setFooter({ text: client.config.embed.footer });
|
||||
dUser.send(embed);
|
||||
dUser.send({ embeds: [embed] });
|
||||
});
|
||||
user.reminds = user.reminds.filter((r) => r.sendAt >= dateNow);
|
||||
user.save();
|
||||
|
|
|
@ -35,7 +35,7 @@ module.exports = {
|
|||
guild.data = guildData;
|
||||
if (member) {
|
||||
guild.channels.cache.forEach((channel) => {
|
||||
const permOverwrites = channel.permissionOverwrites.get(member.id);
|
||||
const permOverwrites = channel.permissionOverwrites.cache.get(member.id);
|
||||
if (permOverwrites) permOverwrites.delete();
|
||||
});
|
||||
};
|
||||
|
@ -47,7 +47,7 @@ module.exports = {
|
|||
count: memberData.mute.case
|
||||
}))
|
||||
.setColor("#f44271")
|
||||
.setFooter({ text: data.config.embed.footer });
|
||||
.setFooter({ text: guild.client.config.embed.footer });
|
||||
const channel = guild.channels.cache.get(guildData.plugins.modlogs);
|
||||
if (channel) channel.send({ embeds: [embed] });
|
||||
|
||||
|
|
|
@ -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 };
|
14
index.js
14
index.js
|
@ -23,7 +23,19 @@ if (config.apiKeys.sentryDSN) {
|
|||
// Load JaBa class
|
||||
const JaBa = require("./base/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"]
|
||||
});
|
||||
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
"SPECIAL_CHANNELS": "Special channels",
|
||||
"MODLOGS": "Moderation logs: *{{channel}}*",
|
||||
"BIRTHDAYS": "Birthdays announcements: *{{channel}}*",
|
||||
"FORTNITESHOP": "Fortnite daily shop: *{{channel}}*",
|
||||
"SUGGESTIONS": "Suggestions: *{{channel}}*",
|
||||
"REPORTS": "Reports: *{{channel}}*",
|
||||
"AUTOMOD_TITLE": "Auto-moderation:",
|
||||
|
|
|
@ -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}}!"
|
||||
}
|
|
@ -56,7 +56,6 @@
|
|||
"UPDATE": "Update",
|
||||
"SUGGESTIONS": "Suggestions",
|
||||
"MODLOGS": "Moderation logs",
|
||||
"FORTNITESHOP": "Fortnite shop",
|
||||
"NO_CHANNEL": "No channel",
|
||||
"REPORTS": "Reports",
|
||||
"BIRTHDAYS": "Birthdays",
|
||||
|
|
|
@ -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"
|
||||
}
|
|
@ -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"
|
||||
}
|
|
@ -7,7 +7,7 @@
|
|||
"NO_BACKUP_FOUND": "Резервных копий с ID `{{backupID}}` не найдено",
|
||||
"TIMES_UP": "Время вышло! Используйте команду снова!",
|
||||
"SUCCESS_PUBLIC": "Резервная копия успешно создана! ID резервной копии был отправлен вам в ЛС!",
|
||||
"SUCCESS_PRIVATE": "Вот ID вашей резервной копии: `{{backupID}}`, используйте его для восстановления на другом сервере!",
|
||||
"SUCCESS_PRIVATE": "Вот ID вашей резервной копии: **`{{backupID}}`**, используйте его для восстановления на другом сервере!",
|
||||
"CONFIRMATION": ":warning: | **Загрузка резервной копии заменит настройки текущего сервера.**\n\n:arrow_right_hook: *Отправьте `confirm` для подтверждения!*",
|
||||
"REMOVE_CONFIRMATION": ":warning: | **Вы уверены что хотите удалить резервную копию? Это действие необратимо**\n\n:arrow_right_hook: *Отправьте `confirm` для подтверждения!*",
|
||||
"SUCCESS_REMOVED": "Резервная копия успешно удалена!",
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
"SPECIAL_CHANNELS": "Специальные каналы",
|
||||
"MODLOGS": "Логи модерации: *{{channel}}*",
|
||||
"BIRTHDAYS": "Поздравления с днём рождения: *{{channel}}*",
|
||||
"FORTNITESHOP": "Ежедневный магазин Fortnite: *{{channel}}*",
|
||||
"SUGGESTIONS": "Предложения: *{{channel}}*",
|
||||
"REPORTS": "Жалобы: *{{channel}}*",
|
||||
"AUTOMOD_TITLE": "Автомодерация",
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"EXAMPLES": "{{prefix}}set level @Jonny_Bro#4226 10",
|
||||
"INVALID_MEMBER": "Вы должны упомянуть пользователя!",
|
||||
"NO_STATUS": "Выберите параметр: `level`, `xp`, `credits` или `bank`",
|
||||
"BOT_USER": "У ботов нет профиля!",
|
||||
"BOT_USER": "Вы не можете изменить статистику бота!",
|
||||
"INVALID_AMOUNT": "Укажите новое значение!",
|
||||
"SUCCESS_LEVEL": "Уровень пользователя **{{username}}** изменён на **{{amount}}**!",
|
||||
"SUCCESS_XP": "XP пользователя **{{username}}** изменён на **{{amount}}**!",
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"DESCRIPTION": "Установить канал для ежедневного Fortnite магазина!",
|
||||
"USAGE": "{{prefix}}setfortniteshop (#канал)",
|
||||
"EXAMPLES": "{{prefix}}setfortniteshop #магазин\n{{prefix}}setfortniteshop",
|
||||
"ENABLED": "Ежедневный Fortnite магазин включён в {{channel}}!",
|
||||
"DISABLED": "Ежедневный Fortnite магазин отключён!"
|
||||
}
|
|
@ -56,7 +56,6 @@
|
|||
"UPDATE": "Обновить",
|
||||
"SUGGESTIONS": "Предложения",
|
||||
"MODLOGS": "Логи модерации",
|
||||
"FORTNITESHOP": "Магазин Fortnite",
|
||||
"NO_CHANNEL": "Канал не выбран",
|
||||
"REPORTS": "Жалобы",
|
||||
"BIRTHDAYS": "Поздравления с днём рождения",
|
||||
|
|
|
@ -6,6 +6,6 @@
|
|||
"BOT_USER": "Ботам не нужны деньги!",
|
||||
"YOURSELF": "Вы не можете заплатить самому себе!",
|
||||
"INVALID_AMOUNT": "Укажите сумму",
|
||||
"ENOUGH_MONEY": "У вас нет **{{amount}}**",
|
||||
"SUCCESS": "Вы отправили **{{amount}}** пользователю **{{username}}**!"
|
||||
"ENOUGH_MONEY": "У вас нет {{amount}}",
|
||||
"SUCCESS": "Вы отправили {{amount}} пользователю **{{username}}**!"
|
||||
}
|
|
@ -2,6 +2,7 @@
|
|||
"DESCRIPTION": "Попытаться ограбить пользователя!",
|
||||
"USAGE": "{{prefix}}rob [@пользователь] [сумма]",
|
||||
"EXAMPLES": "{{prefix}}rob @Jonny_Bro#4226 100",
|
||||
"BOT_USER": "Вы не можете ограбить бота!",
|
||||
"YOURSELF": "Вы не можете ограбить себя!",
|
||||
"MISSING_MEMBER": "Вы должны упомянуть пользователя!",
|
||||
"MISSING_AMOUNT": "Укажите сумму!",
|
||||
|
@ -9,7 +10,7 @@
|
|||
"NOT_ENOUGH_MEMBER": "Вы не можете ограбить **{{username}}**, потому что у него нет с собой столько кредитов!",
|
||||
"COOLDOWN": "🕵️ **{{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_2": "🚓 | Плохие новости... **{{username}}** вовремя позвонил в полицию. Вы должны заплатить **{{fine}}** и **{{offset}}** будет выплачено **{{username}}**."
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"DESCRIPTION": "Превратить текст в ASCII код!",
|
||||
"DESCRIPTION": "Превратить текст в ASCII код!\nПоддерживаются только английские буквы и цифры!",
|
||||
"USAGE": "{{prefix}}ascii [текст]",
|
||||
"EXAMPLES": "{{prefix}}ascii Hello world!",
|
||||
"TEXT_MISSING": "Введите текст (не больше 20 символов)!"
|
||||
|
|
|
@ -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"
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
"DESCRIPTION": "Показать ежедневный магазин Fortnite!",
|
||||
"USAGE": "{{prefix}}fortniteshop",
|
||||
"EXAMPLES": "{{prefix}}fortniteshop",
|
||||
"HEADER": "Магазин предметов FORTNITE",
|
||||
"DAILY": "Ежедневное",
|
||||
"FEATURED": "Предлагаемые",
|
||||
"DATE": "Магазин от {{date}}",
|
||||
"FOOTER": "JaBa | Магазин Fortnite"
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"DESCRIPTION": "Проверить пользователей на наличие ссылок-приглашений в статусе!",
|
||||
"USAGE": "{{prefix}}checkinvites",
|
||||
"EXAMPLES": "{{prefix}}checkinvites",
|
||||
"NOBODY": "Ни у кого нет ссылок-приглашений в статусе!"
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"DESCRIPTION": "Разбранить пользователя на сервере!",
|
||||
"USAGE": "{{prefix}}unban [ID/пользователь#1234]",
|
||||
"EXAMPLES": "{{prefix}}unban 281361531411890186\n{{prefix}}unban Jonny_Bro#4226",
|
||||
"USAGE": "{{prefix}}unban [ID]",
|
||||
"EXAMPLES": "{{prefix}}unban 281361531411890186",
|
||||
"MISSING_ID": "Укажите ID пользователя!",
|
||||
"NOT_BANNED": "**{{username}}** не забанен!",
|
||||
"UNBANNED": "**{{username}}** был разбанен на сервере **{{server}}**!"
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
"T_TITLE": "Название",
|
||||
"T_CHANNEL": "Канал",
|
||||
"T_DURATION": "Длительность",
|
||||
"T_CONF": "Настройки",
|
||||
"T_DESCRIPTION": "Описание",
|
||||
"NO_DESCRIPTION": "Описание отсутствует"
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"DESCRIPTION": "Перемотать вперед или назад на данное время в текущем треке!",
|
||||
"USAGE": "{{prefix}}seek [время]",
|
||||
"EXAMPLES": "{{prefix}}resume 10s\n{{prefix}}resume -10s",
|
||||
"EXAMPLES": "{{prefix}}seek 10s\n{{prefix}}seek -10s",
|
||||
"INVALID_TIME": "Укажите время!",
|
||||
"SUCCESS": "▶️ Трек перемотан!"
|
||||
}
|
|
@ -5,7 +5,7 @@
|
|||
"INVALID_MEMBER": "Вы должны упомянуть пользователя!",
|
||||
"NO_ACTION": "Выберите действие: `set` или `add`!",
|
||||
"NO_STATUS": "Выберите параметр: `level`, `xp`, `credits`, `rep` или `bank`!",
|
||||
"BOT_USER": "У ботов нет профиля!",
|
||||
"BOT_USER": "Вы не можете изменить статистику бота!",
|
||||
"INVALID_AMOUNT": "Укажите новое значение!",
|
||||
"SUCCESS_LEVEL": "Уровень пользователя **{{username}}** изменён на **{{amount}}**!",
|
||||
"SUCCESS_XP": "XP пользователя **{{username}}** изменён на **{{amount}}**!",
|
||||
|
|
|
@ -3,5 +3,5 @@
|
|||
"USAGE": "{{prefix}}reload",
|
||||
"EXAMPLES": "{{prefix}}reload help",
|
||||
"NOT_FOUND": "Команды `{{search}}` не существует!",
|
||||
"SUCCESS": "Команда успешно перезагружена!"
|
||||
"SUCCESS": "Команда `{{command}}` успешно перезагружена!"
|
||||
}
|
|
@ -42,7 +42,6 @@
|
|||
"express-session": "^1.17.0",
|
||||
"ffmpeg-static": "^4.4.0",
|
||||
"figlet": "^1.5.0",
|
||||
"fortnite": "^4.3.2",
|
||||
"gamedig": "^3.0.0",
|
||||
"i18next": "^20.2.2",
|
||||
"i18next-node-fs-backend": "^2.1.3",
|
||||
|
|
|
@ -112,21 +112,6 @@ const checks = [
|
|||
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) {
|
||||
ignore("SentryDSN is not configured, key should not be checked.");
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue