From 98559e6a1d8d928dedb63c382576857b83e41b4f Mon Sep 17 00:00:00 2001 From: JonnyBro Date: Wed, 23 Nov 2022 12:38:27 +0500 Subject: [PATCH] 4.1.16 - https://github.com/JonnyBro/JaBa-logs --- {TO REWRITE => commands/Music}/seek.js | 6 ++++-- commands/Music/shuffle.js | 4 ++-- dashboard/public/docs/updates.md | 4 ++++ events/CommandHandler.js | 2 +- languages/ru-RU/music/seek.json | 4 ++-- languages/uk-UA/music/seek.json | 4 ++-- package-lock.json | 4 ++-- package.json | 2 +- 8 files changed, 18 insertions(+), 12 deletions(-) rename {TO REWRITE => commands/Music}/seek.js (81%) diff --git a/TO REWRITE/seek.js b/commands/Music/seek.js similarity index 81% rename from TO REWRITE/seek.js rename to commands/Music/seek.js index b48ac7e9..2f7cb94d 100644 --- a/TO REWRITE/seek.js +++ b/commands/Music/seek.js @@ -39,8 +39,10 @@ class Seek extends BaseCommand { if (!queue) return interaction.error("music/play:NOT_PLAYING"); const time = interaction.options.getInteger("time"); - queue.seek(time) - .then(() => interaction.replyT("music/seek:SUCCESS", { time: `${time} ${client.getNoun(time, interaction.translate("misc:NOUNS:SECONDS:1"), interaction.translate("misc:NOUNS:SECONDS:2"), interaction.translate("misc:NOUNS:SECONDS:5"))}` })); + queue.seek(time * 1000); + interaction.success("music/seek:SUCCESS", { + time: `**${time}** ${client.getNoun(time, interaction.translate("misc:NOUNS:SECONDS:1"), interaction.translate("misc:NOUNS:SECONDS:2"), interaction.translate("misc:NOUNS:SECONDS:5"))}` + }); } } diff --git a/commands/Music/shuffle.js b/commands/Music/shuffle.js index ae0c8faa..36eb9a23 100644 --- a/commands/Music/shuffle.js +++ b/commands/Music/shuffle.js @@ -36,8 +36,8 @@ class Shuffle extends BaseCommand { const queue = client.player.getQueue(interaction.guildId); if (!queue) return interaction.error("music/play:NOT_PLAYING", null, { ephemeral: true }); - const shuffled = queue.shuffle(); - if (shuffled) interaction.success("music/shuffle:SUCCESS"); + queue.shuffle(); + interaction.success("music/shuffle:SUCCESS"); } } diff --git a/dashboard/public/docs/updates.md b/dashboard/public/docs/updates.md index be7ff805..f4a2155f 100644 --- a/dashboard/public/docs/updates.md +++ b/dashboard/public/docs/updates.md @@ -1,3 +1,7 @@ +### JaBa v4.1.16 +* Добавлено + * Наконец-то возвращена и починена команда *seek*. + ### JaBa v4.1.15 * Изменения * Переписана команда *config*. diff --git a/events/CommandHandler.js b/events/CommandHandler.js index 0dfd2748..65d24996 100644 --- a/events/CommandHandler.js +++ b/events/CommandHandler.js @@ -55,7 +55,7 @@ class CommandHandler extends BaseEvent { }); } - client.logger.log(`User ${interaction.user.tag} used ${command.command.name} in ${interaction.guild.name} with arguments: ${interaction.options.data ? interaction.options.data.map(arg => { return `${arg.name}: ${arg.value}`; }).join(", ") : "no args"}`, "cmd"); + client.logger.log(`User ${interaction.user.tag} used ${command.command.name} in ${interaction.guild.name} with arguments: ${interaction.options.data.length > 0 ? interaction.options.data.map(arg => { return `${arg.name}: ${arg.value}`; }).join(", ") : "no args"}`, "cmd"); return command.execute(client, interaction, data); } diff --git a/languages/ru-RU/music/seek.json b/languages/ru-RU/music/seek.json index 7467daa7..6c19b598 100644 --- a/languages/ru-RU/music/seek.json +++ b/languages/ru-RU/music/seek.json @@ -1,7 +1,7 @@ { - "DESCRIPTION": "Перемотать вперед или назад на данное время в текущем треке", + "DESCRIPTION": "Перемотать вперед на данное время в текущем треке", "USAGE": "[time]", - "EXAMPLES": "seek time:10s\nseek time:-10s", + "EXAMPLES": "seek time:60", "TIME": "Время в секундах", "SUCCESS": "Трек перемотан на {{time}}" } \ No newline at end of file diff --git a/languages/uk-UA/music/seek.json b/languages/uk-UA/music/seek.json index d38158c4..c6bac2df 100644 --- a/languages/uk-UA/music/seek.json +++ b/languages/uk-UA/music/seek.json @@ -1,7 +1,7 @@ { - "DESCRIPTION": "Перемотати вперед або назад у поточному треку", + "DESCRIPTION": "Перемотати вперед у поточному треку", "USAGE": "[time]", - "EXAMPLES": "seek time:10s\nseek time:-10s", + "EXAMPLES": "seek time:60", "TIME": "Час у секундах", "SUCCESS": "Трек перемотаний на {{time}}" } \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 638e3231..ef19c452 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "jaba", - "version": "4.1.15", + "version": "4.1.16", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "jaba", - "version": "4.1.15", + "version": "4.1.16", "license": "ISC", "dependencies": { "@discord-player/extractor": "^3.0.2", diff --git a/package.json b/package.json index f9ddd659..6710f466 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "jaba", - "version": "4.1.15", + "version": "4.1.16", "description": "My Discord Bot", "main": "index.js", "private": true,