mirror of
https://github.com/BluemediaGER/muse.git
synced 2024-11-23 09:15:29 +01:00
Allow skipping past current song in empty queue
This commit is contained in:
parent
18e851821c
commit
53cd705bde
|
@ -23,10 +23,15 @@ export default class implements Command {
|
||||||
try {
|
try {
|
||||||
queue.forward();
|
queue.forward();
|
||||||
|
|
||||||
|
if (queue.isEmpty()) {
|
||||||
|
this.playerManager.get(msg.guild!.id).disconnect();
|
||||||
|
} else {
|
||||||
await this.playerManager.get(msg.guild!.id).play();
|
await this.playerManager.get(msg.guild!.id).play();
|
||||||
|
}
|
||||||
|
|
||||||
await msg.channel.send('keepin\' \'er movin\'');
|
await msg.channel.send('keepin\' \'er movin\'');
|
||||||
} catch (_) {
|
} catch (_) {
|
||||||
|
console.log(_);
|
||||||
await msg.channel.send('no song to skip to');
|
await msg.channel.send('no song to skip to');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,4 +78,8 @@ export default class {
|
||||||
size(): number {
|
size(): number {
|
||||||
return this.queue.length;
|
return this.queue.length;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
isEmpty(): boolean {
|
||||||
|
return this.get().length === 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,7 @@ export default class {
|
||||||
|
|
||||||
const period = 500;
|
const period = 500;
|
||||||
|
|
||||||
const icons = ['⚪', '🔵', '⚫'];
|
const icons = ['🐮', '🐴', '🐄'];
|
||||||
|
|
||||||
const reactions = [];
|
const reactions = [];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue