From 8414ef0b831943a0f4b6909ff0e63bde48254d7e Mon Sep 17 00:00:00 2001 From: "Jonny_Bro (Nikita)" Date: Sun, 5 Nov 2023 16:03:23 +0500 Subject: [PATCH] Rename JaBa class to Client --- base/{JaBa.js => Client.js} | 4 +- commands/!DISABLED/ban.js | 6 +-- commands/!DISABLED/importmee6.js | 6 +-- commands/!DISABLED/kick.js | 6 +-- commands/!DISABLED/memes.js | 6 +-- commands/!DISABLED/staff.js | 6 +-- commands/Administration/automod.js | 6 +-- commands/Administration/autorole.js | 6 +-- commands/Administration/config.js | 6 +-- commands/Administration/goodbye.js | 6 +-- commands/Administration/selectroles.js | 6 +-- commands/Administration/set.js | 6 +-- commands/Administration/setlang.js | 6 +-- commands/Administration/stealemoji.js | 6 +-- commands/Administration/welcome.js | 6 +-- commands/Economy/achievements.js | 6 +-- commands/Economy/bank.js | 6 +-- commands/Economy/birthdate.js | 6 +-- commands/Economy/divorce.js | 6 +-- commands/Economy/leaderboard.js | 12 +++--- commands/Economy/marry.js | 6 +-- commands/Economy/money.js | 6 +-- commands/Economy/pay.js | 6 +-- commands/Economy/profile.js | 6 +-- commands/Economy/rep.js | 8 ++-- commands/Economy/rob.js | 6 +-- commands/Economy/setbio.js | 6 +-- commands/Economy/slots.js | 6 +-- commands/Economy/transactions.js | 6 +-- commands/Economy/work.js | 8 ++-- commands/Fun/8ball.js | 6 +-- commands/Fun/cat.js | 6 +-- commands/Fun/crab.js | 6 +-- commands/Fun/dog.js | 6 +-- commands/Fun/lmgtfy.js | 6 +-- commands/Fun/lovecalc.js | 6 +-- commands/Fun/number.js | 8 ++-- commands/Fun/tictactoe.js | 6 +-- commands/General/afk.js | 6 +-- commands/General/avatar.c.js | 6 +-- commands/General/avatar.js | 6 +-- commands/General/boosters.js | 8 ++-- commands/General/emoji.js | 6 +-- commands/General/help.js | 8 ++-- commands/General/minecraft.js | 6 +-- commands/General/ping.js | 6 +-- commands/General/remindme.js | 6 +-- commands/General/report.js | 6 +-- commands/General/serverinfo.js | 6 +-- commands/General/shorturl.js | 6 +-- commands/General/stats.js | 8 ++-- commands/General/suggest.js | 6 +-- commands/General/userinfo.js | 6 +-- commands/General/whois.js | 6 +-- commands/IAT/checkjar.js | 6 +-- commands/Moderation/clear.js | 6 +-- commands/Moderation/clearwarns.js | 6 +-- commands/Moderation/giveaway.js | 6 +-- commands/Moderation/poll.js | 6 +-- commands/Moderation/unban.js | 6 +-- commands/Moderation/untimeout.js | 6 +-- commands/Moderation/warn.c.js | 6 +-- commands/Moderation/warns.js | 6 +-- commands/Music/back.js | 6 +-- commands/Music/clips.js | 9 ++--- commands/Music/loop.js | 6 +-- commands/Music/nowplaying.js | 9 +++-- commands/Music/play.c.js | 7 ++-- commands/Music/play.js | 9 ++--- commands/Music/queue.js | 8 ++-- commands/Music/seek.js | 6 +-- commands/Music/shuffle.js | 6 +-- commands/Music/skip.js | 6 +-- commands/Music/skipto.js | 6 +-- commands/Music/stop.js | 6 +-- commands/Music/volume.js | 8 ++-- commands/NSFW/nsfw.js | 6 +-- commands/Owner/debug.js | 6 +-- commands/Owner/eval.js | 6 +-- commands/Owner/reload.js | 8 ++-- commands/Owner/say.js | 6 +-- commands/Owner/servers.js | 6 +-- commands/Tickets/adduser.js | 6 +-- commands/Tickets/closeticket.js | 6 +-- commands/Tickets/createticketembed.js | 6 +-- commands/Tickets/removeuser.js | 6 +-- dashboard/dashboard.js | 2 +- events/CommandHandler.js | 2 +- events/Guild/guildBanAdd.js | 2 +- events/Guild/guildCreate.js | 2 +- events/Guild/guildDelete.js | 2 +- events/Guild/guildMemberAdd.js | 2 +- events/Guild/guildMemberRemove.js | 2 +- events/Guild/guildMemberUpdate.js | 2 +- events/MessageHandler.js | 4 +- events/Monitoring/messageDelete.js | 2 +- events/Monitoring/messageUpdate.js | 2 +- events/ready.js | 2 +- helpers/autoUpdateDocs.js | 2 +- helpers/birthdays.js | 2 +- helpers/checkReminds.js | 2 +- helpers/cleanup.js | 2 +- helpers/extenders.js | 28 ++++++------- helpers/functions.js | 54 +++++++++++++------------- index.js | 4 +- 105 files changed, 335 insertions(+), 333 deletions(-) rename base/{JaBa.js => Client.js} (99%) diff --git a/base/JaBa.js b/base/Client.js similarity index 99% rename from base/JaBa.js rename to base/Client.js index e84202fb..31073008 100644 --- a/base/JaBa.js +++ b/base/Client.js @@ -10,7 +10,7 @@ const BaseEvent = require("./BaseEvent.js"), fs = require("fs").promises, mongoose = require("mongoose"); -class JaBa extends Client { +class JaBaClient extends Client { constructor(options) { super(options); this.config = require("../config"); @@ -320,4 +320,4 @@ class JaBa extends Client { } } -module.exports = JaBa; +module.exports = JaBaClient; diff --git a/commands/!DISABLED/ban.js b/commands/!DISABLED/ban.js index d033a596..5913c6ae 100644 --- a/commands/!DISABLED/ban.js +++ b/commands/!DISABLED/ban.js @@ -4,7 +4,7 @@ const BaseCommand = require("../../base/BaseCommand"); class Ban extends BaseCommand { /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ constructor(client) { super({ @@ -45,14 +45,14 @@ class Ban extends BaseCommand { /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/!DISABLED/importmee6.js b/commands/!DISABLED/importmee6.js index 4c19b79b..6c843c61 100644 --- a/commands/!DISABLED/importmee6.js +++ b/commands/!DISABLED/importmee6.js @@ -5,7 +5,7 @@ const BaseCommand = require("../../base/BaseCommand"); class ImportMee6 extends BaseCommand { /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client */ constructor(client) { super({ @@ -21,14 +21,14 @@ class ImportMee6 extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/!DISABLED/kick.js b/commands/!DISABLED/kick.js index 6cf8484f..1ac0f171 100644 --- a/commands/!DISABLED/kick.js +++ b/commands/!DISABLED/kick.js @@ -4,7 +4,7 @@ const BaseCommand = require("../../base/BaseCommand"); class Kick extends BaseCommand { /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ constructor(client) { super({ @@ -45,14 +45,14 @@ class Kick extends BaseCommand { /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/!DISABLED/memes.js b/commands/!DISABLED/memes.js index 850bb862..927ec28b 100644 --- a/commands/!DISABLED/memes.js +++ b/commands/!DISABLED/memes.js @@ -5,7 +5,7 @@ const BaseCommand = require("../../base/BaseCommand"), class Memes extends BaseCommand { /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client */ constructor(client) { super({ @@ -24,7 +24,7 @@ class Memes extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad(client) { client.on("interactionCreate", async interaction => { @@ -52,7 +52,7 @@ class Memes extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/!DISABLED/staff.js b/commands/!DISABLED/staff.js index 22ceb6eb..edef0296 100644 --- a/commands/!DISABLED/staff.js +++ b/commands/!DISABLED/staff.js @@ -4,7 +4,7 @@ const BaseCommand = require("../../base/BaseCommand"); class Staff extends BaseCommand { /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client */ constructor(client) { super({ @@ -23,14 +23,14 @@ class Staff extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/Administration/automod.js b/commands/Administration/automod.js index 1ea54769..1626bf6a 100644 --- a/commands/Administration/automod.js +++ b/commands/Administration/automod.js @@ -4,7 +4,7 @@ const BaseCommand = require("../../base/BaseCommand"); class Automod extends BaseCommand { /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ constructor(client) { super({ @@ -63,14 +63,14 @@ class Automod extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/Administration/autorole.js b/commands/Administration/autorole.js index 11ea7152..8bf69243 100644 --- a/commands/Administration/autorole.js +++ b/commands/Administration/autorole.js @@ -4,7 +4,7 @@ const BaseCommand = require("../../base/BaseCommand"); class Autorole extends BaseCommand { /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ constructor(client) { super({ @@ -43,14 +43,14 @@ class Autorole extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/Administration/config.js b/commands/Administration/config.js index 28a14bfa..033dc286 100644 --- a/commands/Administration/config.js +++ b/commands/Administration/config.js @@ -4,7 +4,7 @@ const BaseCommand = require("../../base/BaseCommand"); class Config extends BaseCommand { /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ constructor(client) { super({ @@ -82,14 +82,14 @@ class Config extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/Administration/goodbye.js b/commands/Administration/goodbye.js index 850f366f..10a6e9a4 100644 --- a/commands/Administration/goodbye.js +++ b/commands/Administration/goodbye.js @@ -4,7 +4,7 @@ const BaseCommand = require("../../base/BaseCommand"); class Goodbye extends BaseCommand { /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ constructor(client) { super({ @@ -79,14 +79,14 @@ class Goodbye extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/Administration/selectroles.js b/commands/Administration/selectroles.js index cbaac01c..46034f88 100644 --- a/commands/Administration/selectroles.js +++ b/commands/Administration/selectroles.js @@ -4,7 +4,7 @@ const BaseCommand = require("../../base/BaseCommand"); class Selectroles extends BaseCommand { /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ constructor(client) { super({ @@ -82,7 +82,7 @@ class Selectroles extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad(client) { client.on("interactionCreate", async interaction => { @@ -110,7 +110,7 @@ class Selectroles extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/Administration/set.js b/commands/Administration/set.js index ac8afdae..7ad80220 100644 --- a/commands/Administration/set.js +++ b/commands/Administration/set.js @@ -4,7 +4,7 @@ const BaseCommand = require("../../base/BaseCommand"); class Set extends BaseCommand { /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client */ constructor(client) { super({ @@ -60,14 +60,14 @@ class Set extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/Administration/setlang.js b/commands/Administration/setlang.js index e5dc48b9..62e6326c 100644 --- a/commands/Administration/setlang.js +++ b/commands/Administration/setlang.js @@ -4,7 +4,7 @@ const BaseCommand = require("../../base/BaseCommand"); class Setlang extends BaseCommand { /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ constructor(client) { super({ @@ -35,14 +35,14 @@ class Setlang extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/Administration/stealemoji.js b/commands/Administration/stealemoji.js index 809589a6..47fb6611 100644 --- a/commands/Administration/stealemoji.js +++ b/commands/Administration/stealemoji.js @@ -4,7 +4,7 @@ const BaseCommand = require("../../base/BaseCommand"); class Stealemoji extends BaseCommand { /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ constructor(client) { super({ @@ -34,14 +34,14 @@ class Stealemoji extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/Administration/welcome.js b/commands/Administration/welcome.js index b25bc15f..b5d975d5 100644 --- a/commands/Administration/welcome.js +++ b/commands/Administration/welcome.js @@ -4,7 +4,7 @@ const BaseCommand = require("../../base/BaseCommand"); class Welcome extends BaseCommand { /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ constructor(client) { super({ @@ -79,14 +79,14 @@ class Welcome extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/Economy/achievements.js b/commands/Economy/achievements.js index 677aaa24..bf551c6d 100644 --- a/commands/Economy/achievements.js +++ b/commands/Economy/achievements.js @@ -4,7 +4,7 @@ const BaseCommand = require("../../base/BaseCommand"); class Achievements extends BaseCommand { /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client */ constructor(client) { super({ @@ -32,14 +32,14 @@ class Achievements extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/Economy/bank.js b/commands/Economy/bank.js index 815b16f3..7ca9db5a 100644 --- a/commands/Economy/bank.js +++ b/commands/Economy/bank.js @@ -4,7 +4,7 @@ const BaseCommand = require("../../base/BaseCommand"); class Bank extends BaseCommand { /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client */ constructor(client) { super({ @@ -44,14 +44,14 @@ class Bank extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/Economy/birthdate.js b/commands/Economy/birthdate.js index af956487..56c61780 100644 --- a/commands/Economy/birthdate.js +++ b/commands/Economy/birthdate.js @@ -4,7 +4,7 @@ const BaseCommand = require("../../base/BaseCommand"); class Birthdate extends BaseCommand { /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client */ constructor(client) { super({ @@ -67,14 +67,14 @@ class Birthdate extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/Economy/divorce.js b/commands/Economy/divorce.js index 3a400f4d..a225d170 100644 --- a/commands/Economy/divorce.js +++ b/commands/Economy/divorce.js @@ -4,7 +4,7 @@ const BaseCommand = require("../../base/BaseCommand"); class Divorce extends BaseCommand { /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client */ constructor(client) { super({ @@ -23,14 +23,14 @@ class Divorce extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/Economy/leaderboard.js b/commands/Economy/leaderboard.js index 26c96f40..9e7fa4cf 100644 --- a/commands/Economy/leaderboard.js +++ b/commands/Economy/leaderboard.js @@ -4,7 +4,7 @@ const BaseCommand = require("../../base/BaseCommand"); class Leaderboard extends BaseCommand { /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client */ constructor(client) { super({ @@ -34,14 +34,14 @@ class Leaderboard extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ @@ -60,7 +60,7 @@ class Leaderboard extends BaseCommand { const membersLeaderboard = [], membersData = await client.membersData.find({ guildID: interaction.guildId }).lean(); - client.functions.asyncForEach(membersData, member => { + await client.functions.asyncForEach(membersData, member => { membersLeaderboard.push({ id: member.id, money: member.money + member.bankSold, @@ -108,7 +108,7 @@ class Leaderboard extends BaseCommand { const membersLeaderboard = [], membersData = await client.membersData.find({ guildID: interaction.guildId }).lean(); - client.functions.asyncForEach(membersData, async member => { + await client.functions.asyncForEach(membersData, async member => { membersLeaderboard.push({ id: member.id, level: member.level, @@ -164,7 +164,7 @@ class Leaderboard extends BaseCommand { const usersLeaderboard = [], usersData = await client.usersData.find({ rep: { $gt: 0 } }).lean(); - client.functions.asyncForEach(usersData, async user => { + await client.functions.asyncForEach(usersData, async user => { usersLeaderboard.push({ id: user.id, rep: user.rep, diff --git a/commands/Economy/marry.js b/commands/Economy/marry.js index 6eb6c8fe..40b09bd2 100644 --- a/commands/Economy/marry.js +++ b/commands/Economy/marry.js @@ -5,7 +5,7 @@ const BaseCommand = require("../../base/BaseCommand"), class Marry extends BaseCommand { /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client */ constructor(client) { super({ @@ -34,14 +34,14 @@ class Marry extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/Economy/money.js b/commands/Economy/money.js index 9e42f707..f7724a6b 100644 --- a/commands/Economy/money.js +++ b/commands/Economy/money.js @@ -4,7 +4,7 @@ const BaseCommand = require("../../base/BaseCommand"); class Money extends BaseCommand { /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client */ constructor(client) { super({ @@ -32,14 +32,14 @@ class Money extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/Economy/pay.js b/commands/Economy/pay.js index aed3866e..7ad885f9 100644 --- a/commands/Economy/pay.js +++ b/commands/Economy/pay.js @@ -4,7 +4,7 @@ const BaseCommand = require("../../base/BaseCommand"); class Pay extends BaseCommand { /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client */ constructor(client) { super({ @@ -43,14 +43,14 @@ class Pay extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/Economy/profile.js b/commands/Economy/profile.js index 8bfdd772..7011d8b2 100644 --- a/commands/Economy/profile.js +++ b/commands/Economy/profile.js @@ -4,7 +4,7 @@ const BaseCommand = require("../../base/BaseCommand"); class Profile extends BaseCommand { /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client */ constructor(client) { super({ @@ -32,14 +32,14 @@ class Profile extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/Economy/rep.js b/commands/Economy/rep.js index 731a6079..7007396f 100644 --- a/commands/Economy/rep.js +++ b/commands/Economy/rep.js @@ -4,7 +4,7 @@ const BaseCommand = require("../../base/BaseCommand"); class Rep extends BaseCommand { /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client */ constructor(client) { super({ @@ -33,14 +33,14 @@ class Rep extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ @@ -49,7 +49,7 @@ class Rep extends BaseCommand { if (isInCooldown) { if (isInCooldown > Date.now()) return interaction.error("economy/rep:COOLDOWN", { - time: client.functions.convertTime(client, isInCooldown, true, true, data.guildData.language), + time: client.functions.convertTime(client, isInCooldown, true, false, data.guildData.language), }); } diff --git a/commands/Economy/rob.js b/commands/Economy/rob.js index b5fd1bb2..e17a5e1b 100644 --- a/commands/Economy/rob.js +++ b/commands/Economy/rob.js @@ -4,7 +4,7 @@ const BaseCommand = require("../../base/BaseCommand"); class Rob extends BaseCommand { /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client */ constructor(client) { super({ @@ -43,14 +43,14 @@ class Rob extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/Economy/setbio.js b/commands/Economy/setbio.js index 12a93259..72588c0a 100644 --- a/commands/Economy/setbio.js +++ b/commands/Economy/setbio.js @@ -4,7 +4,7 @@ const BaseCommand = require("../../base/BaseCommand"); class Setbio extends BaseCommand { /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client */ constructor(client) { super({ @@ -33,14 +33,14 @@ class Setbio extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/Economy/slots.js b/commands/Economy/slots.js index 4b122339..c996fb09 100644 --- a/commands/Economy/slots.js +++ b/commands/Economy/slots.js @@ -4,7 +4,7 @@ const BaseCommand = require("../../base/BaseCommand"); class Slots extends BaseCommand { /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client */ constructor(client) { super({ @@ -33,14 +33,14 @@ class Slots extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/Economy/transactions.js b/commands/Economy/transactions.js index a5dbc2e0..1e2b76b6 100644 --- a/commands/Economy/transactions.js +++ b/commands/Economy/transactions.js @@ -4,7 +4,7 @@ const BaseCommand = require("../../base/BaseCommand"); class Transactions extends BaseCommand { /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client */ constructor(client) { super({ @@ -32,14 +32,14 @@ class Transactions extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/Economy/work.js b/commands/Economy/work.js index 4af27219..78b9646f 100644 --- a/commands/Economy/work.js +++ b/commands/Economy/work.js @@ -4,7 +4,7 @@ const BaseCommand = require("../../base/BaseCommand"); class Work extends BaseCommand { /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client */ constructor(client) { super({ @@ -23,14 +23,14 @@ class Work extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ @@ -39,7 +39,7 @@ class Work extends BaseCommand { if (isInCooldown) { if (isInCooldown > Date.now()) return interaction.error("economy/work:COOLDOWN", { - time: client.functions.convertTime(client, isInCooldown, true, true, data.guildData.language), + time: client.functions.convertTime(client, isInCooldown, true, false, data.guildData.language), }); } if (Date.now() > data.memberData.cooldowns.work + 24 * 60 * 60 * 1000) data.memberData.workStreak = 0; diff --git a/commands/Fun/8ball.js b/commands/Fun/8ball.js index 4e86e56d..770b08bc 100644 --- a/commands/Fun/8ball.js +++ b/commands/Fun/8ball.js @@ -4,7 +4,7 @@ const BaseCommand = require("../../base/BaseCommand"); class Eightball extends BaseCommand { /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client */ constructor(client) { super({ @@ -33,14 +33,14 @@ class Eightball extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/Fun/cat.js b/commands/Fun/cat.js index d73450cc..546900b5 100644 --- a/commands/Fun/cat.js +++ b/commands/Fun/cat.js @@ -5,7 +5,7 @@ const BaseCommand = require("../../base/BaseCommand"), class Cat extends BaseCommand { /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client */ constructor(client) { super({ @@ -24,14 +24,14 @@ class Cat extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/Fun/crab.js b/commands/Fun/crab.js index 8fbb6634..168e4338 100644 --- a/commands/Fun/crab.js +++ b/commands/Fun/crab.js @@ -5,7 +5,7 @@ const BaseCommand = require("../../base/BaseCommand"), class Crab extends BaseCommand { /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client */ constructor(client) { super({ @@ -24,14 +24,14 @@ class Crab extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/Fun/dog.js b/commands/Fun/dog.js index 755f6a1e..00c32eef 100644 --- a/commands/Fun/dog.js +++ b/commands/Fun/dog.js @@ -5,7 +5,7 @@ const BaseCommand = require("../../base/BaseCommand"), class Dog extends BaseCommand { /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client */ constructor(client) { super({ @@ -24,14 +24,14 @@ class Dog extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/Fun/lmgtfy.js b/commands/Fun/lmgtfy.js index 5251cb4b..7aec9300 100644 --- a/commands/Fun/lmgtfy.js +++ b/commands/Fun/lmgtfy.js @@ -5,7 +5,7 @@ const BaseCommand = require("../../base/BaseCommand"), class LMGTFY extends BaseCommand { /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client */ constructor(client) { super({ @@ -44,14 +44,14 @@ class LMGTFY extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/Fun/lovecalc.js b/commands/Fun/lovecalc.js index 17b518f0..b1ed612a 100644 --- a/commands/Fun/lovecalc.js +++ b/commands/Fun/lovecalc.js @@ -5,7 +5,7 @@ const BaseCommand = require("../../base/BaseCommand"), class Lovecalc extends BaseCommand { /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client */ constructor(client) { super({ @@ -43,14 +43,14 @@ class Lovecalc extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/Fun/number.js b/commands/Fun/number.js index 6c52f082..c4a459b9 100644 --- a/commands/Fun/number.js +++ b/commands/Fun/number.js @@ -5,7 +5,7 @@ const BaseCommand = require("../../base/BaseCommand"), class Number extends BaseCommand { /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client */ constructor(client) { super({ @@ -24,14 +24,14 @@ class Number extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ @@ -60,7 +60,7 @@ class Number extends BaseCommand { const parsedNumber = parseInt(msg.content, 10); if (parsedNumber === number) { - const time = client.functions.convertTime(client, gameCreatedAt, false, false, data.guildData.language); + const time = client.functions.convertTime(client, gameCreatedAt, false, true, data.guildData.language); interaction.channel.send({ content: interaction.translate("fun/number:GAME_STATS", { winner: msg.author.toString(), diff --git a/commands/Fun/tictactoe.js b/commands/Fun/tictactoe.js index af668cfb..9a75d583 100644 --- a/commands/Fun/tictactoe.js +++ b/commands/Fun/tictactoe.js @@ -5,7 +5,7 @@ const BaseCommand = require("../../base/BaseCommand"), class TicTacToe extends BaseCommand { /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client */ constructor(client) { super({ @@ -34,14 +34,14 @@ class TicTacToe extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/General/afk.js b/commands/General/afk.js index 493f1613..45cd7b9b 100644 --- a/commands/General/afk.js +++ b/commands/General/afk.js @@ -4,7 +4,7 @@ const BaseCommand = require("../../base/BaseCommand"); class Afk extends BaseCommand { /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client */ constructor(client) { super({ @@ -33,14 +33,14 @@ class Afk extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/General/avatar.c.js b/commands/General/avatar.c.js index 55511ff8..142538f2 100644 --- a/commands/General/avatar.c.js +++ b/commands/General/avatar.c.js @@ -4,7 +4,7 @@ const BaseCommand = require("../../base/BaseCommand"); class AvatarContext extends BaseCommand { /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ constructor() { super({ @@ -19,14 +19,14 @@ class AvatarContext extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").UserContextMenuCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/General/avatar.js b/commands/General/avatar.js index db6eec7f..faae3ccc 100644 --- a/commands/General/avatar.js +++ b/commands/General/avatar.js @@ -4,7 +4,7 @@ const BaseCommand = require("../../base/BaseCommand"); class Avatar extends BaseCommand { /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client */ constructor(client) { super({ @@ -41,14 +41,14 @@ class Avatar extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/General/boosters.js b/commands/General/boosters.js index 9630b32c..0a7039a6 100644 --- a/commands/General/boosters.js +++ b/commands/General/boosters.js @@ -4,7 +4,7 @@ const BaseCommand = require("../../base/BaseCommand"); class Boosters extends BaseCommand { /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client */ constructor(client) { super({ @@ -23,7 +23,7 @@ class Boosters extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad(client) { client.on("interactionCreate", async interaction => { @@ -112,7 +112,7 @@ class Boosters extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ @@ -141,7 +141,7 @@ class Boosters extends BaseCommand { /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Array} boosters * @param {import("../../base/Guild")} guildData diff --git a/commands/General/emoji.js b/commands/General/emoji.js index 9d40b268..9b70bd18 100644 --- a/commands/General/emoji.js +++ b/commands/General/emoji.js @@ -4,7 +4,7 @@ const BaseCommand = require("../../base/BaseCommand"); class Emoji extends BaseCommand { /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client */ constructor(client) { super({ @@ -33,14 +33,14 @@ class Emoji extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/General/help.js b/commands/General/help.js index a6ef54d6..05124150 100644 --- a/commands/General/help.js +++ b/commands/General/help.js @@ -4,7 +4,7 @@ const BaseCommand = require("../../base/BaseCommand"); class Help extends BaseCommand { /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client */ constructor(client) { super({ @@ -33,7 +33,7 @@ class Help extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad(client) { client.on("interactionCreate", async interaction => { @@ -75,7 +75,7 @@ class Help extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ @@ -118,7 +118,7 @@ class Help extends BaseCommand { /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").AutocompleteInteraction} interaction * @returns */ diff --git a/commands/General/minecraft.js b/commands/General/minecraft.js index 30cb4e42..edef6a10 100644 --- a/commands/General/minecraft.js +++ b/commands/General/minecraft.js @@ -5,7 +5,7 @@ const BaseCommand = require("../../base/BaseCommand"), class Minecraft extends BaseCommand { /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client */ constructor(client) { super({ @@ -34,14 +34,14 @@ class Minecraft extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/General/ping.js b/commands/General/ping.js index 0075389a..3521f6d1 100644 --- a/commands/General/ping.js +++ b/commands/General/ping.js @@ -4,7 +4,7 @@ const BaseCommand = require("../../base/BaseCommand"); class Ping extends BaseCommand { /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client */ constructor(client) { super({ @@ -23,14 +23,14 @@ class Ping extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/General/remindme.js b/commands/General/remindme.js index ecde111b..904595d5 100644 --- a/commands/General/remindme.js +++ b/commands/General/remindme.js @@ -6,7 +6,7 @@ const BaseCommand = require("../../base/BaseCommand"), class Remindme extends BaseCommand { /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client */ constructor(client) { super({ @@ -45,14 +45,14 @@ class Remindme extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/General/report.js b/commands/General/report.js index 35a74dca..4e3e3770 100644 --- a/commands/General/report.js +++ b/commands/General/report.js @@ -4,7 +4,7 @@ const BaseCommand = require("../../base/BaseCommand"); class Report extends BaseCommand { /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client */ constructor(client) { super({ @@ -43,14 +43,14 @@ class Report extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/General/serverinfo.js b/commands/General/serverinfo.js index bdc50e36..ae717f4f 100644 --- a/commands/General/serverinfo.js +++ b/commands/General/serverinfo.js @@ -4,7 +4,7 @@ const BaseCommand = require("../../base/BaseCommand"); class Serverinfo extends BaseCommand { /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client */ constructor(client) { super({ @@ -23,14 +23,14 @@ class Serverinfo extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/General/shorturl.js b/commands/General/shorturl.js index 068ff844..6730205a 100644 --- a/commands/General/shorturl.js +++ b/commands/General/shorturl.js @@ -5,7 +5,7 @@ const BaseCommand = require("../../base/BaseCommand"), class Shorturl extends BaseCommand { /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client */ constructor(client) { super({ @@ -34,14 +34,14 @@ class Shorturl extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/General/stats.js b/commands/General/stats.js index 26dc3f38..905fd179 100644 --- a/commands/General/stats.js +++ b/commands/General/stats.js @@ -4,7 +4,7 @@ const BaseCommand = require("../../base/BaseCommand"); class Stats extends BaseCommand { /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client */ constructor(client) { super({ @@ -23,14 +23,14 @@ class Stats extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ @@ -72,7 +72,7 @@ class Stats extends BaseCommand { { name: client.customEmojis.status.online + " " + interaction.translate("general/stats:ONLINE_TITLE"), value: interaction.translate("general/stats:ONLINE_CONTENT", { - time: client.functions.convertTime(client, Date.now() + client.uptime, true, true, data?.guildData?.language), + time: client.functions.convertTime(client, Date.now() + client.uptime, true, false, data?.guildData?.language), }), }, { diff --git a/commands/General/suggest.js b/commands/General/suggest.js index b3a22a05..509e6105 100644 --- a/commands/General/suggest.js +++ b/commands/General/suggest.js @@ -4,7 +4,7 @@ const BaseCommand = require("../../base/BaseCommand"); class Suggest extends BaseCommand { /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client */ constructor(client) { super({ @@ -33,14 +33,14 @@ class Suggest extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/General/userinfo.js b/commands/General/userinfo.js index 6249cce3..85d237c8 100644 --- a/commands/General/userinfo.js +++ b/commands/General/userinfo.js @@ -4,7 +4,7 @@ const BaseCommand = require("../../base/BaseCommand"); class Userinfo extends BaseCommand { /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client */ constructor(client) { super({ @@ -32,14 +32,14 @@ class Userinfo extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/General/whois.js b/commands/General/whois.js index 8d0fe551..94dd76a3 100644 --- a/commands/General/whois.js +++ b/commands/General/whois.js @@ -5,7 +5,7 @@ const BaseCommand = require("../../base/BaseCommand"), class Whois extends BaseCommand { /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client */ constructor(client) { super({ @@ -34,14 +34,14 @@ class Whois extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/IAT/checkjar.js b/commands/IAT/checkjar.js index 628f0f65..344d7b17 100644 --- a/commands/IAT/checkjar.js +++ b/commands/IAT/checkjar.js @@ -6,7 +6,7 @@ const BaseCommand = require("../../base/BaseCommand"), class Checkjar extends BaseCommand { /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client */ constructor(client) { super({ @@ -25,14 +25,14 @@ class Checkjar extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/Moderation/clear.js b/commands/Moderation/clear.js index bd5032bf..ee55d9d0 100644 --- a/commands/Moderation/clear.js +++ b/commands/Moderation/clear.js @@ -4,7 +4,7 @@ const BaseCommand = require("../../base/BaseCommand"); class Clear extends BaseCommand { /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ constructor(client) { super({ @@ -52,14 +52,14 @@ class Clear extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/Moderation/clearwarns.js b/commands/Moderation/clearwarns.js index 1e66b199..4f3bd91e 100644 --- a/commands/Moderation/clearwarns.js +++ b/commands/Moderation/clearwarns.js @@ -4,7 +4,7 @@ const BaseCommand = require("../../base/BaseCommand"); class Clearwarns extends BaseCommand { /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ constructor(client) { super({ @@ -34,14 +34,14 @@ class Clearwarns extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/Moderation/giveaway.js b/commands/Moderation/giveaway.js index 4ea51d72..37565ed3 100644 --- a/commands/Moderation/giveaway.js +++ b/commands/Moderation/giveaway.js @@ -5,7 +5,7 @@ const BaseCommand = require("../../base/BaseCommand"), class Giveaway extends BaseCommand { /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ constructor(client) { super({ @@ -131,14 +131,14 @@ class Giveaway extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/Moderation/poll.js b/commands/Moderation/poll.js index 09fccbe4..1ed768f0 100644 --- a/commands/Moderation/poll.js +++ b/commands/Moderation/poll.js @@ -4,7 +4,7 @@ const BaseCommand = require("../../base/BaseCommand"); class Poll extends BaseCommand { /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ constructor(client) { super({ @@ -34,14 +34,14 @@ class Poll extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/Moderation/unban.js b/commands/Moderation/unban.js index fbac6653..19f8128d 100644 --- a/commands/Moderation/unban.js +++ b/commands/Moderation/unban.js @@ -4,7 +4,7 @@ const BaseCommand = require("../../base/BaseCommand"); class Unban extends BaseCommand { /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ constructor(client) { super({ @@ -34,14 +34,14 @@ class Unban extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/Moderation/untimeout.js b/commands/Moderation/untimeout.js index c47b02c6..2ecd855e 100644 --- a/commands/Moderation/untimeout.js +++ b/commands/Moderation/untimeout.js @@ -4,7 +4,7 @@ const BaseCommand = require("../../base/BaseCommand"); class Ban extends BaseCommand { /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ constructor(client) { super({ @@ -35,14 +35,14 @@ class Ban extends BaseCommand { /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/Moderation/warn.c.js b/commands/Moderation/warn.c.js index 73c06e8f..98096835 100644 --- a/commands/Moderation/warn.c.js +++ b/commands/Moderation/warn.c.js @@ -4,7 +4,7 @@ const BaseCommand = require("../../base/BaseCommand"); class WarnContext extends BaseCommand { /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ constructor() { super({ @@ -20,14 +20,14 @@ class WarnContext extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").UserContextMenuCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/Moderation/warns.js b/commands/Moderation/warns.js index e1062e84..4274c846 100644 --- a/commands/Moderation/warns.js +++ b/commands/Moderation/warns.js @@ -4,7 +4,7 @@ const BaseCommand = require("../../base/BaseCommand"); class Warns extends BaseCommand { /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ constructor(client) { super({ @@ -34,14 +34,14 @@ class Warns extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/Music/back.js b/commands/Music/back.js index 9a5a04a7..57613179 100644 --- a/commands/Music/back.js +++ b/commands/Music/back.js @@ -4,7 +4,7 @@ const BaseCommand = require("../../base/BaseCommand"); class Back extends BaseCommand { /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client */ constructor(client) { super({ @@ -23,14 +23,14 @@ class Back extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/Music/clips.js b/commands/Music/clips.js index 68d5943a..971e6ae2 100644 --- a/commands/Music/clips.js +++ b/commands/Music/clips.js @@ -6,7 +6,7 @@ const BaseCommand = require("../../base/BaseCommand"), class Clips extends BaseCommand { /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client */ constructor(client) { super({ @@ -36,14 +36,14 @@ class Clips extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ @@ -60,7 +60,6 @@ class Clips extends BaseCommand { client.player.play(interaction.member.voice.channel, query, { nodeOptions: { metadata: { - client, channel: interaction.channel, requestedBy: interaction.user, }, @@ -82,7 +81,7 @@ class Clips extends BaseCommand { /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").AutocompleteInteraction} interaction * @returns */ diff --git a/commands/Music/loop.js b/commands/Music/loop.js index ca7f4a63..b697cde1 100644 --- a/commands/Music/loop.js +++ b/commands/Music/loop.js @@ -5,7 +5,7 @@ const BaseCommand = require("../../base/BaseCommand"); class Loop extends BaseCommand { /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client */ constructor(client) { super({ @@ -40,14 +40,14 @@ class Loop extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/Music/nowplaying.js b/commands/Music/nowplaying.js index 3d021ffd..a9c99647 100644 --- a/commands/Music/nowplaying.js +++ b/commands/Music/nowplaying.js @@ -5,7 +5,7 @@ const BaseCommand = require("../../base/BaseCommand"); class Nowplaying extends BaseCommand { /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client */ constructor(client) { super({ @@ -24,7 +24,7 @@ class Nowplaying extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad(client) { client.on("interactionCreate", async interaction => { @@ -161,6 +161,9 @@ class Nowplaying extends BaseCommand { } else if (interaction.customId === "nowp_stop") { await interaction.deferUpdate(); + queue.delete(); + await interaction.followUp({ content: interaction.translate("music/stop:SUCCESS") }); + row1.components.forEach(component => { component.setDisabled(true); }); @@ -178,7 +181,7 @@ class Nowplaying extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/Music/play.c.js b/commands/Music/play.c.js index e8113f09..20533d28 100644 --- a/commands/Music/play.c.js +++ b/commands/Music/play.c.js @@ -4,7 +4,7 @@ const BaseCommand = require("../../base/BaseCommand"); class PlayContext extends BaseCommand { /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ constructor() { super({ @@ -19,14 +19,14 @@ class PlayContext extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").MessageContextMenuCommandInteraction} interaction * @param {Object} data */ @@ -49,7 +49,6 @@ class PlayContext extends BaseCommand { const { queue } = await client.player.play(interaction.member.voice.channel, searchResult, { nodeOptions: { metadata: { - client, channel: interaction.channel, requestedBy: interaction.user, }, diff --git a/commands/Music/play.js b/commands/Music/play.js index 867e816c..57a4eab0 100644 --- a/commands/Music/play.js +++ b/commands/Music/play.js @@ -4,7 +4,7 @@ const BaseCommand = require("../../base/BaseCommand"); class Play extends BaseCommand { /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client */ constructor(client) { super({ @@ -34,14 +34,14 @@ class Play extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ @@ -64,7 +64,6 @@ class Play extends BaseCommand { const { queue } = await client.player.play(interaction.member.voice.channel, searchResult, { nodeOptions: { metadata: { - client, channel: interaction.channel, requestedBy: interaction.user, }, @@ -94,7 +93,7 @@ class Play extends BaseCommand { /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").AutocompleteInteraction} interaction * @returns */ diff --git a/commands/Music/queue.js b/commands/Music/queue.js index a5b652bb..8298c2d9 100644 --- a/commands/Music/queue.js +++ b/commands/Music/queue.js @@ -4,7 +4,7 @@ const BaseCommand = require("../../base/BaseCommand"); class Queue extends BaseCommand { /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client */ constructor(client) { super({ @@ -23,7 +23,7 @@ class Queue extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad(client) { client.on("interactionCreate", async interaction => { @@ -116,7 +116,7 @@ class Queue extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ @@ -148,7 +148,7 @@ class Queue extends BaseCommand { /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {import("discord-player").GuildQueue} queue * @returns diff --git a/commands/Music/seek.js b/commands/Music/seek.js index dbb5c4b8..0c4705ac 100644 --- a/commands/Music/seek.js +++ b/commands/Music/seek.js @@ -4,7 +4,7 @@ const BaseCommand = require("../../base/BaseCommand"); class Seek extends BaseCommand { /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client */ constructor(client) { super({ @@ -32,14 +32,14 @@ class Seek extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/Music/shuffle.js b/commands/Music/shuffle.js index d29550c2..613aa41f 100644 --- a/commands/Music/shuffle.js +++ b/commands/Music/shuffle.js @@ -4,7 +4,7 @@ const BaseCommand = require("../../base/BaseCommand"); class Shuffle extends BaseCommand { /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client */ constructor(client) { super({ @@ -23,14 +23,14 @@ class Shuffle extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/Music/skip.js b/commands/Music/skip.js index be20b3b8..4b1f38b0 100644 --- a/commands/Music/skip.js +++ b/commands/Music/skip.js @@ -4,7 +4,7 @@ const BaseCommand = require("../../base/BaseCommand"); class Skip extends BaseCommand { /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client */ constructor(client) { super({ @@ -23,14 +23,14 @@ class Skip extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/Music/skipto.js b/commands/Music/skipto.js index 28676279..2694701c 100644 --- a/commands/Music/skipto.js +++ b/commands/Music/skipto.js @@ -4,7 +4,7 @@ const BaseCommand = require("../../base/BaseCommand"); class Skipto extends BaseCommand { /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client */ constructor(client) { super({ @@ -33,14 +33,14 @@ class Skipto extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/Music/stop.js b/commands/Music/stop.js index d26c3a87..0e12f78e 100644 --- a/commands/Music/stop.js +++ b/commands/Music/stop.js @@ -4,7 +4,7 @@ const BaseCommand = require("../../base/BaseCommand"); class Stop extends BaseCommand { /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client */ constructor(client) { super({ @@ -23,14 +23,14 @@ class Stop extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/Music/volume.js b/commands/Music/volume.js index 729bbde3..80e8b2d1 100644 --- a/commands/Music/volume.js +++ b/commands/Music/volume.js @@ -4,7 +4,7 @@ const BaseCommand = require("../../base/BaseCommand"); class Volume extends BaseCommand { /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client */ constructor(client) { super({ @@ -34,14 +34,14 @@ class Volume extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ @@ -63,7 +63,7 @@ class Volume extends BaseCommand { /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").AutocompleteInteraction} interaction * @returns */ diff --git a/commands/NSFW/nsfw.js b/commands/NSFW/nsfw.js index af0ee849..676c90f6 100644 --- a/commands/NSFW/nsfw.js +++ b/commands/NSFW/nsfw.js @@ -5,7 +5,7 @@ const BaseCommand = require("../../base/BaseCommand"), class NSFW extends BaseCommand { /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client */ constructor(client) { super({ @@ -24,7 +24,7 @@ class NSFW extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad(client) { client.on("interactionCreate", async interaction => { @@ -52,7 +52,7 @@ class NSFW extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/Owner/debug.js b/commands/Owner/debug.js index bf4a1e12..b29135ac 100644 --- a/commands/Owner/debug.js +++ b/commands/Owner/debug.js @@ -4,7 +4,7 @@ const BaseCommand = require("../../base/BaseCommand"); class Debug extends BaseCommand { /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client */ constructor(client) { super({ @@ -115,14 +115,14 @@ class Debug extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Array} data */ diff --git a/commands/Owner/eval.js b/commands/Owner/eval.js index 4dd2a1a8..e428fd5b 100644 --- a/commands/Owner/eval.js +++ b/commands/Owner/eval.js @@ -4,7 +4,7 @@ const BaseCommand = require("../../base/BaseCommand"); class Eval extends BaseCommand { /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client */ constructor(client) { super({ @@ -33,14 +33,14 @@ class Eval extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/Owner/reload.js b/commands/Owner/reload.js index 26a6e340..6db21d1d 100644 --- a/commands/Owner/reload.js +++ b/commands/Owner/reload.js @@ -6,7 +6,7 @@ const BaseCommand = require("../../base/BaseCommand"), class Reload extends BaseCommand { /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client */ constructor(client) { super({ @@ -36,14 +36,14 @@ class Reload extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ @@ -65,7 +65,7 @@ class Reload extends BaseCommand { /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").AutocompleteInteraction} interaction * @returns */ diff --git a/commands/Owner/say.js b/commands/Owner/say.js index 4b1bc667..17411c85 100644 --- a/commands/Owner/say.js +++ b/commands/Owner/say.js @@ -4,7 +4,7 @@ const BaseCommand = require("../../base/BaseCommand"); class Say extends BaseCommand { /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client */ constructor(client) { super({ @@ -51,14 +51,14 @@ class Say extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/Owner/servers.js b/commands/Owner/servers.js index ad899f80..2d1be0f5 100644 --- a/commands/Owner/servers.js +++ b/commands/Owner/servers.js @@ -4,7 +4,7 @@ const BaseCommand = require("../../base/BaseCommand"); class Servers extends BaseCommand { /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client */ constructor(client) { super({ @@ -23,14 +23,14 @@ class Servers extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/Tickets/adduser.js b/commands/Tickets/adduser.js index 1ea953eb..8a9247d0 100644 --- a/commands/Tickets/adduser.js +++ b/commands/Tickets/adduser.js @@ -4,7 +4,7 @@ const BaseCommand = require("../../base/BaseCommand"); class AddUser extends BaseCommand { /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ constructor(client) { super({ @@ -35,14 +35,14 @@ class AddUser extends BaseCommand { /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/Tickets/closeticket.js b/commands/Tickets/closeticket.js index 791427b9..af52fc2b 100644 --- a/commands/Tickets/closeticket.js +++ b/commands/Tickets/closeticket.js @@ -4,7 +4,7 @@ const BaseCommand = require("../../base/BaseCommand"); class CloseTicket extends BaseCommand { /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ constructor(client) { super({ @@ -25,14 +25,14 @@ class CloseTicket extends BaseCommand { /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/Tickets/createticketembed.js b/commands/Tickets/createticketembed.js index e0495fc8..2157092c 100644 --- a/commands/Tickets/createticketembed.js +++ b/commands/Tickets/createticketembed.js @@ -4,7 +4,7 @@ const BaseCommand = require("../../base/BaseCommand"); class CreateTicketEmbed extends BaseCommand { /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ constructor(client) { super({ @@ -25,7 +25,7 @@ class CreateTicketEmbed extends BaseCommand { /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad(client) { client.on("interactionCreate", async interaction => { @@ -202,7 +202,7 @@ class CreateTicketEmbed extends BaseCommand { } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ diff --git a/commands/Tickets/removeuser.js b/commands/Tickets/removeuser.js index 4bb8ca99..b91b711d 100644 --- a/commands/Tickets/removeuser.js +++ b/commands/Tickets/removeuser.js @@ -4,7 +4,7 @@ const BaseCommand = require("../../base/BaseCommand"); class RemoveUser extends BaseCommand { /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ constructor(client) { super({ @@ -35,14 +35,14 @@ class RemoveUser extends BaseCommand { /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client */ async onLoad() { //... } /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ diff --git a/dashboard/dashboard.js b/dashboard/dashboard.js index 08f626f9..ec461f9c 100644 --- a/dashboard/dashboard.js +++ b/dashboard/dashboard.js @@ -12,7 +12,7 @@ const locales = { /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client */ module.exports.load = async client => { const commands = client.commands.map(v => { diff --git a/events/CommandHandler.js b/events/CommandHandler.js index 310bea4d..43ac6b89 100644 --- a/events/CommandHandler.js +++ b/events/CommandHandler.js @@ -11,7 +11,7 @@ class CommandHandler extends BaseEvent { /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client * @param {import("discord.js").BaseInteraction} interaction */ async execute(client, interaction) { diff --git a/events/Guild/guildBanAdd.js b/events/Guild/guildBanAdd.js index bb6d5b86..64ec9a78 100644 --- a/events/Guild/guildBanAdd.js +++ b/events/Guild/guildBanAdd.js @@ -11,7 +11,7 @@ class guildBanAdd extends BaseEvent { /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").GuildBan} ban */ async execute(client, ban) { diff --git a/events/Guild/guildCreate.js b/events/Guild/guildCreate.js index b0401a33..e1bce358 100644 --- a/events/Guild/guildCreate.js +++ b/events/Guild/guildCreate.js @@ -11,7 +11,7 @@ class GuildCreate extends BaseEvent { /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").Guild} guild */ async execute(client, guild) { diff --git a/events/Guild/guildDelete.js b/events/Guild/guildDelete.js index 4cb81af2..2065cf2c 100644 --- a/events/Guild/guildDelete.js +++ b/events/Guild/guildDelete.js @@ -11,7 +11,7 @@ class GuildDelete extends BaseEvent { /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").Guild} guild */ async execute(client, guild) { diff --git a/events/Guild/guildMemberAdd.js b/events/Guild/guildMemberAdd.js index 878b51d2..b5458cb7 100644 --- a/events/Guild/guildMemberAdd.js +++ b/events/Guild/guildMemberAdd.js @@ -24,7 +24,7 @@ class GuildMemberAdd extends BaseEvent { /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").GuildMember} member */ async execute(client, member) { diff --git a/events/Guild/guildMemberRemove.js b/events/Guild/guildMemberRemove.js index 5e3edd32..63cb9f56 100644 --- a/events/Guild/guildMemberRemove.js +++ b/events/Guild/guildMemberRemove.js @@ -24,7 +24,7 @@ class GuildMemberRemove extends BaseEvent { /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").GuildMember} member */ async execute(client, member) { diff --git a/events/Guild/guildMemberUpdate.js b/events/Guild/guildMemberUpdate.js index 12be20a7..83b4c3eb 100644 --- a/events/Guild/guildMemberUpdate.js +++ b/events/Guild/guildMemberUpdate.js @@ -10,7 +10,7 @@ class GuildMemberUpdate extends BaseEvent { /** * - * @param {import("../../base/JaBa")} client + * @param {import("../../base/Client")} client * @param {import("discord.js").GuildMember} oldMember * @param {import("discord.js").GuildMember} newMember */ diff --git a/events/MessageHandler.js b/events/MessageHandler.js index 5242bb17..1f6c3f82 100644 --- a/events/MessageHandler.js +++ b/events/MessageHandler.js @@ -13,7 +13,7 @@ class MessageCreate extends BaseEvent { /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client * @param {import("discord.js").Message} message */ async execute(client, message) { @@ -120,7 +120,7 @@ class MessageCreate extends BaseEvent { /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client * @param {import("discord.js").Message} msg * @param {import("../base/Member")} memberData * @returns diff --git a/events/Monitoring/messageDelete.js b/events/Monitoring/messageDelete.js index 18828e8d..fdaf764e 100644 --- a/events/Monitoring/messageDelete.js +++ b/events/Monitoring/messageDelete.js @@ -11,7 +11,7 @@ class messageDelete extends BaseEvent { /** * - * @param {import("../../base/JaBa")} client The Discord Client + * @param {import("../../base/Client")} client The Discord Client * @param {import("discord.js").Message} message The deleted message */ async execute(client, message) { diff --git a/events/Monitoring/messageUpdate.js b/events/Monitoring/messageUpdate.js index ef17ecb7..61e80c51 100644 --- a/events/Monitoring/messageUpdate.js +++ b/events/Monitoring/messageUpdate.js @@ -11,7 +11,7 @@ class messageUpdate extends BaseEvent { /** * - * @param {import("../../base/JaBa")} client The Discord client + * @param {import("../../base/Client")} client The Discord client * @param {import("discord.js").Message} oldMessage The message before the update * @param {import("discord.js").Message} newMessage The message after the update */ diff --git a/events/ready.js b/events/ready.js index 386eb10e..ec4fdeb5 100644 --- a/events/ready.js +++ b/events/ready.js @@ -10,7 +10,7 @@ class Ready extends BaseEvent { } /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client */ async execute(client) { const commands = [...new Map(client.commands.map(v => [v.constructor.name, v])).values()]; diff --git a/helpers/autoUpdateDocs.js b/helpers/autoUpdateDocs.js index 0bcf6172..950181a0 100644 --- a/helpers/autoUpdateDocs.js +++ b/helpers/autoUpdateDocs.js @@ -3,7 +3,7 @@ const table = require("markdown-table"), /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client */ module.exports.update = function (client) { const commands = [...new Map(client.commands.map(v => [v.constructor.name, v])).values()], diff --git a/helpers/birthdays.js b/helpers/birthdays.js index 7bc05200..227b6328 100644 --- a/helpers/birthdays.js +++ b/helpers/birthdays.js @@ -3,7 +3,7 @@ const { CronJob } = require("cron"), /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client */ module.exports.init = async function (client) { const cronjob = new CronJob("0 5 * * *", async function () { diff --git a/helpers/checkReminds.js b/helpers/checkReminds.js index 9c039d80..dd7b21e0 100644 --- a/helpers/checkReminds.js +++ b/helpers/checkReminds.js @@ -3,7 +3,7 @@ const moment = require("moment"); /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client */ module.exports.init = function (client) { client.usersData.find({ reminds: { $gt: [] } }).then(users => { diff --git a/helpers/cleanup.js b/helpers/cleanup.js index c99b8d68..4b012c61 100644 --- a/helpers/cleanup.js +++ b/helpers/cleanup.js @@ -16,7 +16,7 @@ function setDaysTimeout(callback, days) { /** * - * @param {import("../base/JaBa")} client + * @param {import("../base/Client")} client */ module.exports.init = async function (client) { setDaysTimeout(async () => { diff --git a/helpers/extenders.js b/helpers/extenders.js index 0c0068ad..cbb6f05a 100644 --- a/helpers/extenders.js +++ b/helpers/extenders.js @@ -11,24 +11,24 @@ BaseInteraction.prototype.translate = function (key, args) { return language(key, args); }; -BaseInteraction.prototype.replyT = function (key, args, options = {}) { +BaseInteraction.prototype.replyT = async function (key, args, options = {}) { const translated = this.translate(key, args, this.guild.data.language ?? "en-US"); const string = options.prefixEmoji ? `${this.client.customEmojis[options.prefixEmoji]} | ${translated}` : translated; - if (options.edit) return this.editReply({ content: string, ephemeral: options.ephemeral || false }); - else return this.reply({ content: string, ephemeral: options.ephemeral || false }); + if (options.edit) return await this.editReply({ content: string, ephemeral: options.ephemeral || false }); + else return await this.reply({ content: string, ephemeral: options.ephemeral || false }); }; -BaseInteraction.prototype.success = function (key, args, options = {}) { +BaseInteraction.prototype.success = async function (key, args, options = {}) { options.prefixEmoji = "success"; - return this.replyT(key, args, options); + return await this.replyT(key, args, options); }; -BaseInteraction.prototype.error = function (key, args, options = {}) { +BaseInteraction.prototype.error = async function (key, args, options = {}) { options.prefixEmoji = "error"; - return this.replyT(key, args, options); + return await this.replyT(key, args, options); }; Message.prototype.translate = function (key, args) { @@ -38,22 +38,22 @@ Message.prototype.translate = function (key, args) { return language(key, args); }; -Message.prototype.replyT = function (key, args, options = {}) { +Message.prototype.replyT = async function (key, args, options = {}) { const translated = this.translate(key, args, this.guild.data.language ?? "en-US"); const string = options.prefixEmoji ? `${this.client.customEmojis[options.prefixEmoji]} | ${translated}` : translated; - if (options.edit) return this.edit({ content: string, allowedMentions: { repliedUser: options.mention ? true : false } }); - else return this.reply({ content: string, allowedMentions: { repliedUser: options.mention ? true : false } }); + if (options.edit) return await this.edit({ content: string, allowedMentions: { repliedUser: options.mention ? true : false } }); + else return await this.reply({ content: string, allowedMentions: { repliedUser: options.mention ? true : false } }); }; -Message.prototype.success = function (key, args, options = {}) { +Message.prototype.success = async function (key, args, options = {}) { options.prefixEmoji = "success"; - return this.replyT(key, args, options); + return await this.replyT(key, args, options); }; -Message.prototype.error = function (key, args, options = {}) { +Message.prototype.error = async function (key, args, options = {}) { options.prefixEmoji = "error"; - return this.replyT(key, args, options); + return await this.replyT(key, args, options); }; diff --git a/helpers/functions.js b/helpers/functions.js index 48cdf8e9..6e6fd4e4 100644 --- a/helpers/functions.js +++ b/helpers/functions.js @@ -10,10 +10,10 @@ moment.relativeTimeThreshold("M", 12); module.exports = { /** - * Create invite link to guild - * @param {import("../base/JaBa")} client Discord client - * @param {String} guildId Guild's ID - * @returns {String} Invite Link + * Creates Invite Link to The Guild + * @param {import("../base/Client")} client Discord Client + * @param {String} guildId ID of The Guild + * @returns {String} Invite Link to This Guild */ async createInvite(client, guildId) { const guild = client.guilds.cache.get(guildId), @@ -24,9 +24,9 @@ module.exports = { }, /** - * Calls a callback for each element in collection async - * @param {Array} collection - * @param {Function} callback + * Calls a Callback for Each Element in Collection Asynchronously + * @param {Array} collection Collection + * @param {Function} callback Function to Perform on Collection * @returns {Promise} */ async asyncForEach(collection, callback) { @@ -38,10 +38,10 @@ module.exports = { }, /** - * Sorts array by key - * @param {Array} array Array to sort + * Sorts an Array by Key + * @param {Array} array Array to Sort * @param {Number} key Key - * @returns {Array} Sorted array + * @returns {Array} Sorted Array */ sortByKey(array, key) { return array.sort(function (a, b) { @@ -52,13 +52,15 @@ module.exports = { }, /** - * Shuffles the array - * @param {*} pArray Array to shuffle - * @returns {Array} Shuffled array + * Shuffles the Array + * @param {Array} pArray Array to Shuffle + * @returns {Array} Shuffled Array */ shuffle(pArray) { const array = []; + pArray.forEach(element => array.push(element)); + let currentIndex = array.length, temporaryValue, randomIndex; @@ -76,9 +78,9 @@ module.exports = { }, /** - * Returns a random integer between min (inclusive) and max (inclusive) - * @param {Number} min Min - * @param {Number} max Max + * Returns a Random Number Between min (inclusive) And max (inclusive) + * @param {Number} min Min value (inclusive) + * @param {Number} max Max value (inclusive) * @returns {Number} Integer */ randomNum(min, max) { @@ -89,12 +91,12 @@ module.exports = { }, /** - * Beautify date - * @param {import("../base/JaBa")} client Discord client + * Beautifies the given Date + * @param {import("../base/Client")} client Discord Client * @param {Date} date Date - * @param {String | null} format Format for moment + * @param {String | null} format Format for Moment * @param {String} locale Language - * @returns {String} Beautified date + * @returns {String} Beautified Date */ printDate(client, date, format = null, locale = client.defaultLanguage) { const languageData = client.languages.find(language => language.name === locale); @@ -104,23 +106,23 @@ module.exports = { }, /** - * Converts given time - * @param {import("../base/JaBa")} client Discord client + * Converts the Given Time + * @param {import("../base/Client")} client Discord Client * @param {String} time Time * @param {Boolean} type Type (To now = true or from now = false) - * @param {Boolean} noPrefix Use prefix? + * @param {Boolean} prefix Include Prefix * @param {String} locale Language * @returns {String} Time */ - convertTime(client, time, type = false, noPrefix = false, locale = client.defaultLanguage) { + convertTime(client, time, type = false, prefix = true, locale = client.defaultLanguage) { const languageData = client.languages.find(language => language.name === locale); const m = moment(time).locale(languageData.moment); - return type ? m.toNow(noPrefix) : m.fromNow(noPrefix); + return type ? m.toNow(!prefix) : m.fromNow(!prefix); }, /** - * Get a noun for number + * Get a Noun for Number * @param {Number} number Number * @param {String} one String for one * @param {String} two String for two diff --git a/index.js b/index.js index 3e60656d..10f3d0b2 100644 --- a/index.js +++ b/index.js @@ -1,9 +1,9 @@ require("./helpers/extenders"); const { GatewayIntentBits } = require("discord.js"), - JaBa = require("./base/JaBa"); + Client = require("./base/Client"); -const client = new JaBa({ +const client = new Client({ intents: [ GatewayIntentBits.Guilds, GatewayIntentBits.GuildMembers, GatewayIntentBits.GuildBans, GatewayIntentBits.GuildEmojisAndStickers, GatewayIntentBits.GuildIntegrations, GatewayIntentBits.GuildInvites, GatewayIntentBits.GuildVoiceStates, GatewayIntentBits.GuildPresences, GatewayIntentBits.GuildMessages, GatewayIntentBits.GuildMessageReactions, GatewayIntentBits.GuildMessageTyping, GatewayIntentBits.MessageContent, GatewayIntentBits.DirectMessageTyping, GatewayIntentBits.DirectMessages, GatewayIntentBits.DirectMessageReactions ], allowedMentions: { parse: ["everyone", "roles", "users"] }, });