mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-22 05:04:58 +05:00
Принять изменения
This commit is contained in:
commit
b12aadc755
51 changed files with 185 additions and 199 deletions
7
.gitignore
vendored
7
.gitignore
vendored
|
@ -6,13 +6,12 @@ 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
|
||||||
|
|
||||||
|
# Backups
|
||||||
|
backups
|
||||||
|
|
||||||
# Mac OS files
|
# Mac OS files
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
# JaBa-new
|
# JaBa
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 921 KiB |
Binary file not shown.
Before Width: | Height: | Size: 158 KiB |
Binary file not shown.
Before Width: | Height: | Size: 11 KiB |
Binary file not shown.
Before Width: | Height: | Size: 4.1 KiB |
Binary file not shown.
Before Width: | Height: | Size: 8.3 KiB |
Binary file not shown.
Before Width: | Height: | Size: 14 KiB |
|
@ -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
|
||||||
|
|
|
@ -107,10 +107,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();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,8 @@ const Command = require("../../base/Command.js"),
|
||||||
backup = require("discord-backup"),
|
backup = require("discord-backup"),
|
||||||
Sentry = require("@sentry/node");
|
Sentry = require("@sentry/node");
|
||||||
|
|
||||||
|
backup.setStorageFolder(__dirname + "../../../backups");
|
||||||
|
|
||||||
class Backup extends Command {
|
class Backup extends Command {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
super(client, {
|
super(client, {
|
||||||
|
@ -15,7 +17,7 @@ class Backup extends Command {
|
||||||
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS", "ADMINISTRATOR"],
|
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS", "ADMINISTRATOR"],
|
||||||
nsfw: false,
|
nsfw: false,
|
||||||
ownerOnly: false,
|
ownerOnly: false,
|
||||||
cooldown: 10000
|
cooldown: 20000
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,24 +52,21 @@ class Backup extends Command {
|
||||||
max: 1,
|
max: 1,
|
||||||
time: 20000,
|
time: 20000,
|
||||||
errors: ["time"]
|
errors: ["time"]
|
||||||
}).catch(() => {
|
}).catch((err) => {
|
||||||
// if the author of the commands does not confirm the backup loading
|
console.error(err);
|
||||||
return message.error("misc:TIMES_UP");
|
return message.error("administration/backup:TIMES_UP");
|
||||||
});
|
});
|
||||||
// When the author of the command has confirmed that he wants to load the backup on his server
|
|
||||||
message.author.send(message.translate("administration/backup:START_LOADING"));
|
message.author.send(message.translate("administration/backup:START_LOADING"));
|
||||||
// Load the backup
|
|
||||||
backup.load(backupID, message.guild).then(() => {
|
backup.load(backupID, message.guild).then(() => {
|
||||||
// When the backup is loaded, delete them from the server
|
|
||||||
backup.remove(backupID);
|
backup.remove(backupID);
|
||||||
message.author.send(message.translate("administration/backup:LOAD_SUCCESS"));
|
message.author.send(message.translate("administration/backup:LOAD_SUCCESS"));
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
Sentry.captureException(err);
|
console.error(err);
|
||||||
// If an error occurenced
|
|
||||||
return message.error("misc:ERR_OCCURRED");
|
return message.error("misc:ERR_OCCURRED");
|
||||||
});
|
});
|
||||||
}).catch(() => {
|
}).catch((err) => {
|
||||||
// if the backup wasn't found
|
console.error(err);
|
||||||
return message.error("administration/backup:NO_BACKUP_FOUND", {
|
return message.error("administration/backup:NO_BACKUP_FOUND", {
|
||||||
backupID
|
backupID
|
||||||
});
|
});
|
||||||
|
@ -76,22 +75,47 @@ class Backup extends Command {
|
||||||
const backupID = args[1];
|
const backupID = args[1];
|
||||||
if (!backupID) return message.error("administration/backup:MISSING_BACKUP_ID");
|
if (!backupID) return message.error("administration/backup:MISSING_BACKUP_ID");
|
||||||
|
|
||||||
backup.fetch(backupID).then(async (backupInfos) => {
|
backup.fetch(backupID).then(async (backupInfo) => {
|
||||||
const embed = new Discord.MessageEmbed()
|
const embed = new Discord.MessageEmbed()
|
||||||
.setAuthor(message.translate("administration/backup:TITLE_INFO"))
|
.setAuthor({
|
||||||
// Display the backup ID
|
name: message.translate("administration/backup:TITLE_INFO")
|
||||||
.addField(message.translate("administration/backup:TITLE_ID"), backupInfos.id, true)
|
})
|
||||||
// Displays the server from which this backup comes
|
.addField(message.translate("administration/backup:TITLE_ID"), backupInfo.id, true)
|
||||||
.addField(message.translate("administration/backup:TITLE_SERVER_ID"), backupInfos.data.guildID, true)
|
.addField(message.translate("administration/backup:TITLE_SERVER_ID"), backupInfo.data.guildID.toString(), true)
|
||||||
// Display the size (in mb) of the backup
|
.addField(message.translate("administration/backup:TITLE_SIZE"), `${backupInfo.size} kb`, true)
|
||||||
.addField(message.translate("administration/backup:TITLE_SIZE"), `${backupInfos.size}mb`, true)
|
.addField(message.translate("administration/backup:TITLE_CREATED_AT"), message.printDate(new Date(backupInfo.data.createdTimestamp)), true)
|
||||||
// Display when the backup was created
|
|
||||||
.addField(message.translate("administration/backup:TITLE_CREATED_AT"), message.printDate(new Date(backupInfos.data.createdTimestamp)), true)
|
|
||||||
.setColor(data.config.embed.color)
|
.setColor(data.config.embed.color)
|
||||||
.setFooter(data.config.embed.footer);
|
.setFooter({
|
||||||
message.channel.send(embed);
|
text: data.config.embed.footer
|
||||||
}).catch(() => {
|
});
|
||||||
// if the backup wasn't found
|
message.channel.send({
|
||||||
|
embeds: [embed]
|
||||||
|
});
|
||||||
|
}).catch((err) => {
|
||||||
|
console.error(err);
|
||||||
|
return message.error("administration/backup:NO_BACKUP_FOUND", {
|
||||||
|
backupID
|
||||||
|
});
|
||||||
|
});
|
||||||
|
} else if (status === "remove") {
|
||||||
|
const backupID = args[1];
|
||||||
|
if (!backupID) return message.error("administration/backup:MISSING_BACKUP_ID");
|
||||||
|
|
||||||
|
backup.fetch(backupID).then(async () => {
|
||||||
|
message.sendT("administration/backup:REMOVE_CONFIRMATION");
|
||||||
|
await message.channel.awaitMessages(m => (m.author.id === message.author.id) && (m.content === "confirm"), {
|
||||||
|
max: 1,
|
||||||
|
time: 20000,
|
||||||
|
errors: ["time"]
|
||||||
|
}).catch(() => {
|
||||||
|
return message.error("administration/backup:TIMES_UP");
|
||||||
|
});
|
||||||
|
|
||||||
|
backup.remove(backupID).then(async () => {
|
||||||
|
message.success("administration/backup:SUCCESS_REMOVED");
|
||||||
|
});
|
||||||
|
}).catch((err) => {
|
||||||
|
console.error(err);
|
||||||
return message.error("administration/backup:NO_BACKUP_FOUND", {
|
return message.error("administration/backup:NO_BACKUP_FOUND", {
|
||||||
backupID
|
backupID
|
||||||
});
|
});
|
||||||
|
|
|
@ -61,9 +61,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")
|
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -18,45 +18,54 @@ 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(message.translate("economy/achievements:TITLE"))
|
.setAuthor(message.translate("economy/achievements:TITLE"))
|
||||||
.setColor(data.config.embed.color)
|
.setColor(data.config.embed.color)
|
||||||
.setFooter(data.config.embed.footer);
|
.setFooter(data.config.embed.footer);
|
||||||
|
|
||||||
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(embed);
|
message.channel.send(embed);
|
||||||
|
|
|
@ -26,7 +26,13 @@ class Pay extends Command {
|
||||||
if (!sentAmount || isNaN(sentAmount) || parseInt(sentAmount, 10) <= 0) return message.error("economy/pay:INVALID_AMOUNT", { username: member.user.tag });
|
if (!sentAmount || isNaN(sentAmount) || parseInt(sentAmount, 10) <= 0) return message.error("economy/pay:INVALID_AMOUNT", { username: member.user.tag });
|
||||||
|
|
||||||
const amount = Math.ceil(parseInt(sentAmount, 10));
|
const amount = Math.ceil(parseInt(sentAmount, 10));
|
||||||
|
<<<<<<< HEAD
|
||||||
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"))}` });
|
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"))}` });
|
||||||
|
=======
|
||||||
|
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"))}`
|
||||||
|
});
|
||||||
|
>>>>>>> discordjs-13
|
||||||
|
|
||||||
const memberData = await this.client.findOrCreateMember({
|
const memberData = await this.client.findOrCreateMember({
|
||||||
id: member.id,
|
id: member.id,
|
||||||
|
@ -40,7 +46,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
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -81,7 +81,19 @@ class Profile extends Command {
|
||||||
.setFooter(data.config.embed.footer) // Sets the footer of the embed
|
.setFooter(data.config.embed.footer) // Sets the footer of the embed
|
||||||
.setTimestamp();
|
.setTimestamp();
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
message.channel.send(profileEmbed); // Send the embed in the current channel
|
message.channel.send(profileEmbed); // Send the embed in the current channel
|
||||||
|
=======
|
||||||
|
const buffer = await userData.getAchievements();
|
||||||
|
|
||||||
|
message.channel.send({
|
||||||
|
embeds: [profileEmbed],
|
||||||
|
files: [{
|
||||||
|
name: "achievements.png",
|
||||||
|
attachment: buffer
|
||||||
|
}]
|
||||||
|
}); // Send the embed in the current channel
|
||||||
|
>>>>>>> discordjs-13
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -80,7 +80,11 @@ class Work extends Command {
|
||||||
data.memberData.save();
|
data.memberData.save();
|
||||||
|
|
||||||
const messageOptions = {
|
const messageOptions = {
|
||||||
|
<<<<<<< HEAD
|
||||||
embed
|
embed
|
||||||
|
=======
|
||||||
|
embeds: [embed]
|
||||||
|
>>>>>>> discordjs-13
|
||||||
};
|
};
|
||||||
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;
|
||||||
|
|
|
@ -66,8 +66,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(),
|
||||||
|
|
|
@ -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: [],
|
||||||
|
|
|
@ -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(guild.name, guild.iconURL({
|
.setAuthor(guild.name, guild.iconURL({
|
||||||
|
@ -45,8 +46,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 === "text").size} ${message.getNoun(guild.channels.cache.filter(c => c.type === "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 === "text").size} ${message.getNoun(guild.channels.cache.filter(c => c.type === "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 === "voice").size} ${message.getNoun(guild.channels.cache.filter(c => c.type === "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 === "voice").size} ${message.getNoun(guild.channels.cache.filter(c => c.type === "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(() => {});
|
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 collector = new Discord.MessageCollector(message.channel, (m) => m.author.id === message.author.id, {
|
const collector = new Discord.MessageCollector(message.channel, (m) => m.author.id === message.author.id, {
|
||||||
time: 240000
|
time: 240000
|
||||||
|
|
|
@ -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 collector = new Discord.MessageCollector(message.channel, (m) => m.author.id === message.author.id, {
|
const collector = new Discord.MessageCollector(message.channel, (m) => m.author.id === message.author.id, {
|
||||||
time: 240000
|
time: 240000
|
||||||
|
|
|
@ -23,7 +23,7 @@ class AutoPlay extends Command {
|
||||||
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");
|
||||||
|
|
||||||
const autoplay = queue.toggleAutoplay()
|
const autoplay = queue.toggleAutoplay();
|
||||||
|
|
||||||
message.success(`music/autoplay:SUCCESS_${autoplay ? "ENABLED" : "DISABLED"}`);
|
message.success(`music/autoplay:SUCCESS_${autoplay ? "ENABLED" : "DISABLED"}`);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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(message.translate("music/queue:TITLE"))
|
.setAuthor(message.translate("music/queue:TITLE"))
|
||||||
|
@ -34,6 +44,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(data.config.embed.footer)
|
.setFooter(data.config.embed.footer)
|
||||||
.setTimestamp();
|
.setTimestamp();
|
||||||
|
|
|
@ -17,11 +17,10 @@ class Play extends Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
async run(message, args) {
|
async run(message, args) {
|
||||||
const name = args.join(" ");
|
|
||||||
if (!name) return message.error("music/play:MISSING_SONG_NAME");
|
|
||||||
|
|
||||||
const voice = message.member.voice.channel;
|
const voice = message.member.voice.channel;
|
||||||
|
const name = args.join(" ");
|
||||||
if (!voice) return message.error("music/play:NO_VOICE_CHANNEL");
|
if (!voice) return message.error("music/play:NO_VOICE_CHANNEL");
|
||||||
|
if (!name) return message.error("music/play:MISSING_SONG_NAME");
|
||||||
|
|
||||||
// Check my permissions
|
// Check my permissions
|
||||||
const perms = voice.permissionsFor(this.client.user);
|
const perms = voice.permissionsFor(this.client.user);
|
||||||
|
|
|
@ -18,7 +18,7 @@ class Queue extends Command {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async run(message, args, data) {
|
async run(message, args, data, interaction) {
|
||||||
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);
|
||||||
|
|
||||||
|
@ -44,15 +44,15 @@ class Queue extends Command {
|
||||||
}))
|
}))
|
||||||
.addField(message.translate("music/np:CURRENTLY_PLAYING"), `[${queue.songs[0].name}](${queue.songs[0].url})\n*Добавил ${queue.songs[0].member}*\n`);
|
.addField(message.translate("music/np:CURRENTLY_PLAYING"), `[${queue.songs[0].name}](${queue.songs[0].url})\n*Добавил ${queue.songs[0].member}*\n`);
|
||||||
|
|
||||||
FieldsEmbed.setArray(queue.songs[1] ? queue.songs.slice(1, queue.songs.length) : [])
|
FieldsEmbed
|
||||||
|
.setArray(queue.songs[1] ? queue.songs.slice(1, queue.songs.length) : [])
|
||||||
.setAuthorizedUsers([message.author.id])
|
.setAuthorizedUsers([message.author.id])
|
||||||
.setChannel(message.channel)
|
.setChannel(message.channel)
|
||||||
.setElementsPerPage(5)
|
.setElementsPerPage(5)
|
||||||
.setDeleteOnTimeout(true)
|
.setDeleteOnTimeout(true)
|
||||||
.setPageIndicator(true)
|
.setPageIndicator(true)
|
||||||
.formatField("Очередь", (track) => `[${track.name}](${track.url})\n*Добавил ${track.member}*\n`);
|
.formatField("Очередь", (track) => `[${track.name}](${track.url})\n*Добавил ${track.member}*\n`)
|
||||||
|
.build();
|
||||||
FieldsEmbed.build();
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,10 @@ 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);
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
const time = ms(args[0]) / 1000;
|
||||||
|
>>>>>>> discordjs-13
|
||||||
|
|
||||||
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");
|
||||||
|
|
|
@ -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;
|
||||||
|
|
||||||
|
|
|
@ -194,6 +194,19 @@
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<pre class="brush: html">
|
<pre class="brush: html">
|
||||||
-----------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
JaBa v3.2
|
||||||
|
-----------------------------------------------------------------------------------------
|
||||||
|
Изменения
|
||||||
|
- Переход на discord.js v13.
|
||||||
|
Обновление очень большое, обязательно сообщайте мне если найдёте ошибку!
|
||||||
|
|
||||||
|
Примечания
|
||||||
|
- tictactoe отключена до обновления модуля на discord.js 13!
|
||||||
|
|
||||||
|
-----------------------------------------------------------------------------------------
|
||||||
|
>>>>>>> discordjs-13
|
||||||
JaBa v3.1.6
|
JaBa v3.1.6
|
||||||
-----------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------
|
||||||
Исправления
|
Исправления
|
||||||
|
|
|
@ -167,6 +167,7 @@
|
||||||
<% } %>
|
<% } %>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
<<<<<<< HEAD
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label><%= translate("common:FORTNITESHOP") %></label>
|
<label><%= translate("common:FORTNITESHOP") %></label>
|
||||||
<select class="form-control" name="fortniteshop">
|
<select class="form-control" name="fortniteshop">
|
||||||
|
@ -185,6 +186,8 @@
|
||||||
<% } %>
|
<% } %>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
=======
|
||||||
|
>>>>>>> discordjs-13
|
||||||
</div>
|
</div>
|
||||||
<!-- /.box-body -->
|
<!-- /.box-body -->
|
||||||
<div class="box-footer">
|
<div class="box-footer">
|
||||||
|
|
|
@ -33,10 +33,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);
|
||||||
|
|
||||||
|
|
|
@ -31,8 +31,8 @@ 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(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();
|
||||||
|
|
|
@ -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(guild.client.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(embed);
|
if (channel) channel.send(embed);
|
||||||
|
|
||||||
|
|
26
index.js
26
index.js
|
@ -20,11 +20,25 @@ if (config.apiKeys.sentryDSN) {
|
||||||
};
|
};
|
||||||
|
|
||||||
// Load JaBa class
|
// Load JaBa class
|
||||||
const JaBa = require("./base/JaBa"),
|
const JaBa = require("./base/JaBa");
|
||||||
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,
|
||||||
|
],
|
||||||
|
partials: ["CHANNEL"]
|
||||||
|
});
|
||||||
|
|
||||||
const init = async () => {
|
const init = async () => {
|
||||||
// Search for all commands
|
|
||||||
const directories = await readdir("./commands/");
|
const directories = await readdir("./commands/");
|
||||||
client.logger.log(`Loading a total of ${directories.length} categories.`, "log");
|
client.logger.log(`Loading a total of ${directories.length} categories.`, "log");
|
||||||
directories.forEach(async (dir) => {
|
directories.forEach(async (dir) => {
|
||||||
|
@ -37,7 +51,6 @@ const init = async () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// Then we load events, which will include our message and ready event.
|
|
||||||
const evtFiles = await readdir("./events/");
|
const evtFiles = await readdir("./events/");
|
||||||
client.logger.log(`Loading a total of ${evtFiles.length} events.`, "log");
|
client.logger.log(`Loading a total of ${evtFiles.length} events.`, "log");
|
||||||
evtFiles.forEach((file) => {
|
evtFiles.forEach((file) => {
|
||||||
|
@ -48,9 +61,8 @@ const init = async () => {
|
||||||
delete require.cache[require.resolve(`./events/${file}`)];
|
delete require.cache[require.resolve(`./events/${file}`)];
|
||||||
});
|
});
|
||||||
|
|
||||||
client.login(client.config.token); // Log in to the discord api
|
client.login(client.config.token);
|
||||||
|
|
||||||
// connect to mongoose database
|
|
||||||
mongoose.connect(client.config.mongoDB, {
|
mongoose.connect(client.config.mongoDB, {
|
||||||
useNewUrlParser: true,
|
useNewUrlParser: true,
|
||||||
useUnifiedTopology: true
|
useUnifiedTopology: true
|
||||||
|
@ -69,11 +81,9 @@ const init = async () => {
|
||||||
|
|
||||||
init();
|
init();
|
||||||
|
|
||||||
// if there are errors, log them
|
|
||||||
client.on("disconnect", () => client.logger.log("Bot is disconnecting...", "warn"))
|
client.on("disconnect", () => client.logger.log("Bot is disconnecting...", "warn"))
|
||||||
.on("reconnecting", () => client.logger.log("Bot reconnecting...", "log"))
|
.on("reconnecting", () => client.logger.log("Bot reconnecting...", "log"))
|
||||||
.on("error", (e) => client.logger.log(e, "error"))
|
.on("error", (e) => client.logger.log(e, "error"))
|
||||||
.on("warn", (info) => client.logger.log(info, "warn"));
|
.on("warn", (info) => client.logger.log(info, "warn"));
|
||||||
|
|
||||||
// if there is an unhandledRejection, log them
|
|
||||||
process.on("unhandledRejection", (err) => console.error(err));
|
process.on("unhandledRejection", (err) => console.error(err));
|
|
@ -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:",
|
||||||
|
|
|
@ -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",
|
"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",
|
||||||
|
|
|
@ -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"
|
|
||||||
}
|
|
|
@ -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": "Автомодерация",
|
||||||
|
|
|
@ -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": "Обновить",
|
"UPDATE": "Обновить",
|
||||||
"SUGGESTIONS": "Предложения",
|
"SUGGESTIONS": "Предложения",
|
||||||
"MODLOGS": "Логи модерации",
|
"MODLOGS": "Логи модерации",
|
||||||
"FORTNITESHOP": "Магазин Fortnite",
|
|
||||||
"NO_CHANNEL": "Канал не выбран",
|
"NO_CHANNEL": "Канал не выбран",
|
||||||
"REPORTS": "Жалобы",
|
"REPORTS": "Жалобы",
|
||||||
"BIRTHDAYS": "Поздравления с днём рождения",
|
"BIRTHDAYS": "Поздравления с днём рождения",
|
||||||
|
|
|
@ -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}}**!"
|
||||||
}
|
}
|
|
@ -10,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}}**."
|
||||||
}
|
}
|
|
@ -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 символов)!"
|
||||||
|
|
|
@ -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": "Ни у кого нет ссылок-приглашений в статусе!"
|
|
||||||
}
|
|
|
@ -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": "Описание отсутствует"
|
||||||
}
|
}
|
|
@ -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}}` успешно перезагружена!"
|
||||||
}
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "jaba",
|
"name": "jaba",
|
||||||
"version": "3.1.6",
|
"version": "3.2",
|
||||||
"description": "A very complete Discord bot (more than 100 commands) that uses the Discord.js",
|
"description": "A very complete Discord bot (more than 100 commands) that uses the Discord.js",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"private": true,
|
"private": true,
|
||||||
|
@ -32,7 +32,7 @@
|
||||||
"discord-backup": "^2.1.19",
|
"discord-backup": "^2.1.19",
|
||||||
"discord-canvas": "^1.3.2",
|
"discord-canvas": "^1.3.2",
|
||||||
"discord-giveaways": "^4.4.3",
|
"discord-giveaways": "^4.4.3",
|
||||||
"discord-paginationembed": "^2.1.0",
|
"discord-paginationembed": "github:gazmull/discord-paginationembed#v3",
|
||||||
"discord-tictactoe": "^2.2.0",
|
"discord-tictactoe": "^2.2.0",
|
||||||
"discord-together": "^1.3.25",
|
"discord-together": "^1.3.25",
|
||||||
"discord.js": "^12.5.3",
|
"discord.js": "^12.5.3",
|
||||||
|
@ -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",
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
Loading…
Reference in a new issue