mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-22 13:14:58 +05:00
This commit is contained in:
parent
07318d0d4a
commit
98559e6a1d
8 changed files with 18 additions and 12 deletions
|
@ -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"))}`
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
### JaBa v4.1.16
|
||||||
|
* Добавлено
|
||||||
|
* Наконец-то возвращена и починена команда *seek*.
|
||||||
|
|
||||||
### JaBa v4.1.15
|
### JaBa v4.1.15
|
||||||
* Изменения
|
* Изменения
|
||||||
* Переписана команда *config*.
|
* Переписана команда *config*.
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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}}"
|
||||||
}
|
}
|
|
@ -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
4
package-lock.json
generated
|
@ -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",
|
||||||
|
|
|
@ -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,
|
||||||
|
|
Loading…
Reference in a new issue