mirror of
https://github.com/BluemediaGER/muse.git
synced 2024-11-10 03:55:29 +01:00
fix: range and q size check
This commit is contained in:
parent
5a74115beb
commit
fe233cb98c
|
@ -48,8 +48,13 @@ export default class implements Command {
|
|||
return;
|
||||
}
|
||||
|
||||
if (range[1] > player.queueSize()) {
|
||||
await res.stop(errorMsg('queue isn\'t THAT big'));
|
||||
return;
|
||||
}
|
||||
|
||||
if (range[0] < range[1]) {
|
||||
player.removeFromQueue(range[0], range[0] - range[1]);
|
||||
player.removeFromQueue(range[0], range[1] - range[0] + 1);
|
||||
} else {
|
||||
await res.stop(errorMsg('range is backwards, just like you'));
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue