mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-24 22:24:58 +05:00
Косметические изменения
This commit is contained in:
parent
fd6ba9c735
commit
f188dcd117
8 changed files with 53 additions and 36 deletions
|
@ -42,7 +42,7 @@ class Leaderboard extends Command {
|
|||
const user = (await this.client.users.fetch(data.id)).tag;
|
||||
|
||||
userNames += `**${i + 1}**. ${user}\n`;
|
||||
money += `**${data.money}**\n`;
|
||||
money += `${data.money}\n`;
|
||||
}
|
||||
|
||||
const embed = new Discord.MessageEmbed()
|
||||
|
@ -89,8 +89,8 @@ class Leaderboard extends Command {
|
|||
const user = (await this.client.users.fetch(data.id)).tag;
|
||||
|
||||
userNames += `**${i + 1}**. ${user}\n`;
|
||||
level += `**${data.level}**\n`;
|
||||
xp += `**${data.xp}** / **${5 * (data.level * data.level) + 80 * data.level + 100}**\n`;
|
||||
level += `${data.level}\n`;
|
||||
xp += `${data.xp} / ${5 * (data.level * data.level) + 80 * data.level + 100}\n`;
|
||||
}
|
||||
|
||||
const embed = new Discord.MessageEmbed()
|
||||
|
@ -139,7 +139,7 @@ class Leaderboard extends Command {
|
|||
const user = (await this.client.users.fetch(data.id)).tag;
|
||||
|
||||
userNames += `**${i + 1}**. ${user}\n`;
|
||||
rep += `**${data.rep}**\n`;
|
||||
rep += `${data.rep}\n`;
|
||||
}
|
||||
|
||||
const embed = new Discord.MessageEmbed()
|
||||
|
|
|
@ -5,10 +5,10 @@ module.exports = {
|
|||
* @param {object} client The Discord Client instance
|
||||
*/
|
||||
update(client) {
|
||||
const table = require("markdown-table");
|
||||
const fs = require("fs");
|
||||
const commands = client.commands;
|
||||
const categories = [];
|
||||
const table = require("markdown-table"),
|
||||
fs = require("fs"),
|
||||
commands = client.commands,
|
||||
categories = [];
|
||||
commands.forEach((cmd) => {
|
||||
if (!categories.includes(cmd.help.category)) categories.push(cmd.help.category);
|
||||
});
|
||||
|
|
|
@ -4,11 +4,11 @@ const CronJob = require("cron").CronJob,
|
|||
async function init(client) {
|
||||
new CronJob("0 8 * * *", async function () {
|
||||
client.guilds.cache.forEach(async (guild) => {
|
||||
const date = new Date();
|
||||
const currentDay = date.getDate();
|
||||
const currentMonth = date.getMonth();
|
||||
const currentYear = date.getFullYear();
|
||||
const guildData = await client.findOrCreateGuild({
|
||||
const date = new Date(),
|
||||
currentDay = date.getDate(),
|
||||
currentMonth = date.getMonth(),
|
||||
currentYear = date.getFullYear(),
|
||||
guildData = await client.findOrCreateGuild({
|
||||
id: guild.id
|
||||
});
|
||||
|
||||
|
@ -27,18 +27,25 @@ async function init(client) {
|
|||
|
||||
if (currentMonth === month && currentDay === day) {
|
||||
const embed = new Discord.MessageEmbed()
|
||||
.setAuthor({ name: client.user.username, iconURL: client.user.displayAvatarURL({
|
||||
.setAuthor({
|
||||
name: client.user.username,
|
||||
iconURL: client.user.displayAvatarURL({
|
||||
size: 512,
|
||||
dynamic: true,
|
||||
format: "png"
|
||||
})})
|
||||
})
|
||||
})
|
||||
.setColor(client.config.embed.color)
|
||||
.setFooter({ text: client.config.embed.footer })
|
||||
.setFooter({
|
||||
text: client.config.embed.footer
|
||||
})
|
||||
.addField(client.translate("economy/birthdate:HAPPY_BIRTHDAY"), client.translate("economy/birthdate:HAPPY_BIRTHDAY_MESSAGE", {
|
||||
user: user.id,
|
||||
age: `${age} ${client.getNoun(age, client.translate("misc:NOUNS:AGE:1"), client.translate("misc:NOUNS:AGE:2"), client.translate("misc:NOUNS:AGE:5"))}`
|
||||
}));
|
||||
const msg = await channel.send({ content: "@here", embeds: [embed] });
|
||||
const msg = await channel.send({
|
||||
embeds: [embed]
|
||||
});
|
||||
await msg.react("🎉");
|
||||
}
|
||||
}
|
||||
|
@ -49,4 +56,6 @@ async function init(client) {
|
|||
}, null, true, "Europe/Moscow");
|
||||
}
|
||||
|
||||
module.exports = { init };
|
||||
module.exports = {
|
||||
init
|
||||
};
|
|
@ -25,14 +25,20 @@ module.exports = {
|
|||
if (mustSent.length > 0) {
|
||||
mustSent.forEach((r) => {
|
||||
const embed = new Discord.MessageEmbed()
|
||||
.setAuthor({ name: client.translate("general/remindme:TITLE") })
|
||||
.setAuthor({
|
||||
name: client.translate("general/remindme:TITLE")
|
||||
})
|
||||
.addField(client.translate("common:CREATION"), client.translate("general/remindme:CREATED", {
|
||||
time: client.convertTime(r.createdAt, "from")
|
||||
}))
|
||||
.addField(client.translate("common:MESSAGE"), r.message)
|
||||
.setColor(client.config.embed.color)
|
||||
.setFooter({ text: client.config.embed.footer });
|
||||
dUser.send({ embeds: [embed] });
|
||||
.setFooter({
|
||||
text: client.config.embed.footer
|
||||
});
|
||||
dUser.send({
|
||||
embeds: [embed]
|
||||
});
|
||||
});
|
||||
user.reminds = user.reminds.filter((r) => r.sendAt >= dateNow);
|
||||
user.save();
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
const Discord = require("discord.js");
|
||||
|
||||
/* THIS CHECK IF THERE IS A USER TO UNMUTE */
|
||||
module.exports = {
|
||||
/**
|
||||
* Starts checking...
|
||||
* Check if there is a user to unmute
|
||||
* @param {object} client The Discord Client instance
|
||||
*/
|
||||
async init(client) {
|
||||
|
@ -47,9 +46,13 @@ module.exports = {
|
|||
count: memberData.mute.case
|
||||
}))
|
||||
.setColor("#f44271")
|
||||
.setFooter({ text: guild.client.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] });
|
||||
if (channel) channel.send({
|
||||
embeds: [embed]
|
||||
});
|
||||
|
||||
memberData.mute = {
|
||||
muted: false,
|
||||
|
|
|
@ -31,7 +31,7 @@ module.exports = {
|
|||
}
|
||||
},
|
||||
|
||||
// This function return a actual link to the support server
|
||||
// This function return an actual link to the support server
|
||||
async supportLink(client) {
|
||||
const guild = client.guilds.cache.get(client.config.support.id);
|
||||
const member = guild.me;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
const i18next = require("i18next");
|
||||
const Backend = require("i18next-node-fs-backend");
|
||||
const path = require("path");
|
||||
const fs = require("fs").promises;
|
||||
const i18next = require("i18next"),
|
||||
Backend = require("i18next-node-fs-backend"),
|
||||
path = require("path"),
|
||||
fs = require("fs").promises;
|
||||
|
||||
async function walkDirectory(dir, namespaces = [], folderName = "") {
|
||||
const files = await fs.readdir(dir);
|
||||
|
|
|
@ -24,7 +24,6 @@ module.exports = class Logger {
|
|||
static log(content, type = "log") {
|
||||
const date = `[${format(new Date(Date.now()))}]:`;
|
||||
switch (type) {
|
||||
// Check the message type and then print him in the console
|
||||
case "log": {
|
||||
return console.log(`${date} ${bgBlue(type.toUpperCase())} ${content} `);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue