mirror of
https://github.com/BluemediaDev/muse.git
synced 2025-04-19 21:03:56 +02:00
fix: range and q size check
This commit is contained in:
parent
5a74115beb
commit
fe233cb98c
1 changed files with 6 additions and 1 deletions
|
@ -48,8 +48,13 @@ export default class implements Command {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (range[1] > player.queueSize()) {
|
||||||
|
await res.stop(errorMsg('queue isn\'t THAT big'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (range[0] < range[1]) {
|
if (range[0] < range[1]) {
|
||||||
player.removeFromQueue(range[0], range[0] - range[1]);
|
player.removeFromQueue(range[0], range[1] - range[0] + 1);
|
||||||
} else {
|
} else {
|
||||||
await res.stop(errorMsg('range is backwards, just like you'));
|
await res.stop(errorMsg('range is backwards, just like you'));
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Reference in a new issue