commit 5ea48e22b8e1d867c33b678a5f157560ece5e9d4
parent 32cdc8e9ead599fbd5fceb953054161ca6734258
Author: Demonstrandum <moi@knutsen.co>
Date: Wed, 11 Nov 2020 02:00:23 +0000
Fix multiple pops in vc...
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/commands/vc.ts b/lib/commands/vc.ts
@@ -49,7 +49,7 @@ export default async(home_scope: HomeScope) => {
const next = CONFIG.vc_queue.pop();
if (next) {
GID.vc_dispatcher = GID.vc.play(
- ytdl(CONFIG.vc_queue.pop(), DL_OPTIONS));
+ ytdl(next, DL_OPTIONS));
CLIENT.channels.fetch(CONFIG.vc_channel)
.then((ch: TextChannel) =>
ch.send(`Now playing: ${next}`));
@@ -58,10 +58,10 @@ export default async(home_scope: HomeScope) => {
}
break;
case "d":
- CONFIG.vc_queue.splice(Number(args[1]), 1);
+ CONFIG.vc_queue.splice(Number(args[1]) - 1, 1);
break;
case "i":
- CONFIG.vc_queue.splice(Number(args[1]), 0, args[2]);
+ CONFIG.vc_queue.splice(Number(args[1]) - 1, 0, args[2]);
break;
case "ls":
message.answer(ls(CONFIG.vc_queue));