fix localization

This commit is contained in:
Jonny_Bro (Nikita) 2024-04-30 13:07:22 +05:00
parent 752171e429
commit cd0e096e64
Signed by: jonny_bro
GPG key ID: 3F1ECC04147E9BD8

View file

@ -46,18 +46,20 @@ class Skip extends BaseCommand {
const position = interaction.options.getInteger("position"); const position = interaction.options.getInteger("position");
if (position) { if (position) {
if (position <= 0) return interaction.error("music/skipto:NO_PREV_SONG"); if (position <= 0) return interaction.error("music/skip:NO_PREV_SONG");
if (queue.tracks.at(position - 1)) { if (queue.tracks.at(position - 1)) {
queue.node.skipTo(queue.tracks.at(position - 1)); queue.node.skipTo(queue.tracks.at(position - 1));
interaction.success("music/skipto:SUCCESS", { interaction.success("music/skip:SUCCESS", {
track: queue.tracks.at(0).title, track: queue.tracks.at(0).title,
}); });
} else return interaction.error("music/skipto:ERROR", { position }); } else return interaction.error("music/skip:ERROR", { position });
} else { } else {
queue.node.skip(); queue.node.skip();
interaction.success("music/skip:SUCCESS"); interaction.success("music/skip:SUCCESS", {
track: queue.tracks.at(0).title,
});
} }
} }
} }