This commit is contained in:
JonnyBro 2022-11-23 12:38:27 +05:00
parent 07318d0d4a
commit 98559e6a1d
8 changed files with 18 additions and 12 deletions

View file

@ -39,8 +39,10 @@ class Seek extends BaseCommand {
if (!queue) return interaction.error("music/play:NOT_PLAYING"); if (!queue) return interaction.error("music/play:NOT_PLAYING");
const time = interaction.options.getInteger("time"); const time = interaction.options.getInteger("time");
queue.seek(time) queue.seek(time * 1000);
.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"))}` })); 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"))}`
});
} }
} }

View file

@ -36,8 +36,8 @@ class Shuffle extends BaseCommand {
const queue = client.player.getQueue(interaction.guildId); const queue = client.player.getQueue(interaction.guildId);
if (!queue) return interaction.error("music/play:NOT_PLAYING", null, { ephemeral: true }); if (!queue) return interaction.error("music/play:NOT_PLAYING", null, { ephemeral: true });
const shuffled = queue.shuffle(); queue.shuffle();
if (shuffled) interaction.success("music/shuffle:SUCCESS"); interaction.success("music/shuffle:SUCCESS");
} }
} }

View file

@ -1,3 +1,7 @@
### JaBa v4.1.16
* Добавлено
* Наконец-то возвращена и починена команда *seek*.
### JaBa v4.1.15 ### JaBa v4.1.15
* Изменения * Изменения
* Переписана команда *config*. * Переписана команда *config*.

View file

@ -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); return command.execute(client, interaction, data);
} }

View file

@ -1,7 +1,7 @@
{ {
"DESCRIPTION": "Перемотать вперед или назад на данное время в текущем треке", "DESCRIPTION": "Перемотать вперед на данное время в текущем треке",
"USAGE": "[time]", "USAGE": "[time]",
"EXAMPLES": "seek time:10s\nseek time:-10s", "EXAMPLES": "seek time:60",
"TIME": "Время в секундах", "TIME": "Время в секундах",
"SUCCESS": "Трек перемотан на {{time}}" "SUCCESS": "Трек перемотан на {{time}}"
} }

View file

@ -1,7 +1,7 @@
{ {
"DESCRIPTION": "Перемотати вперед або назад у поточному треку", "DESCRIPTION": "Перемотати вперед у поточному треку",
"USAGE": "[time]", "USAGE": "[time]",
"EXAMPLES": "seek time:10s\nseek time:-10s", "EXAMPLES": "seek time:60",
"TIME": "Час у секундах", "TIME": "Час у секундах",
"SUCCESS": "Трек перемотаний на {{time}}" "SUCCESS": "Трек перемотаний на {{time}}"
} }

4
package-lock.json generated
View file

@ -1,12 +1,12 @@
{ {
"name": "jaba", "name": "jaba",
"version": "4.1.15", "version": "4.1.16",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "jaba", "name": "jaba",
"version": "4.1.15", "version": "4.1.16",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"@discord-player/extractor": "^3.0.2", "@discord-player/extractor": "^3.0.2",

View file

@ -1,6 +1,6 @@
{ {
"name": "jaba", "name": "jaba",
"version": "4.1.15", "version": "4.1.16",
"description": "My Discord Bot", "description": "My Discord Bot",
"main": "index.js", "main": "index.js",
"private": true, "private": true,