mirror of
https://github.com/remix-bot/fluxer.git
synced 2026-11-24 06:01:44 -05:00
fix(player, ui, voice): resolve seek 0 validation, help paginator reset, and voice retry backoff (#22)
This commit is contained in:
1 parent
04aece8af3
commit
08e5d363fc
4 files changed
+35
-30
No files matched your search
+4
-2
@@ -48,8 +48,10 @@ export async function run(msg, data) {
|
||||
return msg.reply({ embeds: [new EmbedBuilder().setColor(ERROR_COLOR).setDescription(this.t(msg, "responses.seek.live"))] });
|
||||
}
|
||||
|
||||
let seekMs = Utils.parseDuration(positionInput);
|
||||
if (!seekMs || seekMs < 0) {
|
||||
const trimmed = String(positionInput ?? "").trim();
|
||||
const isZero = /^0+(:0+)?(:0+)?$/.test(trimmed);
|
||||
const seekMs = isZero ? 0 : Utils.parseDuration(trimmed);
|
||||
if (seekMs === null || isNaN(seekMs) || seekMs < 0 || (!isZero && seekMs === 0)) {
|
||||
return msg.reply({ embeds: [new EmbedBuilder().setColor(ERROR_COLOR).setDescription(this.t(msg, "responses.seek.invalidFormat"))] });
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user