mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-22 13:14:58 +05:00
Локализация времени в rep, work и stats
This commit is contained in:
parent
f6370e044a
commit
542a4e6f8b
3 changed files with 4 additions and 4 deletions
|
@ -37,7 +37,7 @@ class Rep extends BaseCommand {
|
||||||
const isInCooldown = data.userData.cooldowns?.rep;
|
const isInCooldown = data.userData.cooldowns?.rep;
|
||||||
if (isInCooldown) {
|
if (isInCooldown) {
|
||||||
if (isInCooldown > Date.now()) return interaction.error("economy/rep:COOLDOWN", {
|
if (isInCooldown > Date.now()) return interaction.error("economy/rep:COOLDOWN", {
|
||||||
time: client.convertTime(isInCooldown, true, true)
|
time: client.convertTime(isInCooldown, true, true, data.guildData.language)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ class Work extends BaseCommand {
|
||||||
const isInCooldown = data.memberData.cooldowns?.work;
|
const isInCooldown = data.memberData.cooldowns?.work;
|
||||||
if (isInCooldown) {
|
if (isInCooldown) {
|
||||||
if (isInCooldown > Date.now()) return interaction.error("economy/work:COOLDOWN", {
|
if (isInCooldown > Date.now()) return interaction.error("economy/work:COOLDOWN", {
|
||||||
time: client.convertTime(isInCooldown, true, true)
|
time: client.convertTime(isInCooldown, true, true, data.guildData.language)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (Date.now() > data.memberData.cooldowns.work + (24 * 60 * 60 * 1000)) data.memberData.workStreak = 0;
|
if (Date.now() > data.memberData.cooldowns.work + (24 * 60 * 60 * 1000)) data.memberData.workStreak = 0;
|
||||||
|
|
|
@ -31,7 +31,7 @@ class Stats extends BaseCommand {
|
||||||
* @param {import("discord.js").ChatInputCommandInteraction} interaction
|
* @param {import("discord.js").ChatInputCommandInteraction} interaction
|
||||||
* @param {Object} data
|
* @param {Object} data
|
||||||
*/
|
*/
|
||||||
async execute(client, interaction) {
|
async execute(client, interaction, data) {
|
||||||
const hiddenGuild = await client.guilds.fetch("568120814776614924");
|
const hiddenGuild = await client.guilds.fetch("568120814776614924");
|
||||||
const users = client.users.cache.size - hiddenGuild.memberCount;
|
const users = client.users.cache.size - hiddenGuild.memberCount;
|
||||||
const servers = client.guilds.cache.size - 1;
|
const servers = client.guilds.cache.size - 1;
|
||||||
|
@ -67,7 +67,7 @@ class Stats extends BaseCommand {
|
||||||
{
|
{
|
||||||
name: client.customEmojis.status.online + " " + interaction.translate("general/stats:ONLINE_TITLE"),
|
name: client.customEmojis.status.online + " " + interaction.translate("general/stats:ONLINE_TITLE"),
|
||||||
value: interaction.translate("general/stats:ONLINE_CONTENT", {
|
value: interaction.translate("general/stats:ONLINE_CONTENT", {
|
||||||
time: client.convertTime(Date.now() + client.uptime, true, true)
|
time: client.convertTime(Date.now() + client.uptime, true, true, data.guildData.language)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue