diff --git a/commands/music/queue.tsx b/commands/music/queue.tsx index d9b8522..18eaee6 100644 --- a/commands/music/queue.tsx +++ b/commands/music/queue.tsx @@ -54,7 +54,10 @@ export default class Queue extends Command { emoji("eight"), emoji("nine"), ]; - const queueEntries = queue.player.queue.tracks; + const queueEntries = [ + queue.player.current, + ...queue.player.queue.tracks, + ]; await ctx.message.reply(undefined, { embeds: [ diff --git a/commands/music/remove.ts b/commands/music/remove.ts index 0c1ee24..9a0695c 100644 --- a/commands/music/remove.ts +++ b/commands/music/remove.ts @@ -61,7 +61,7 @@ export default class Remove extends Command { ctx.argString == "" || isNaN(parseInt(ctx.argString)) || parseInt(ctx.argString) < 1 || - parseInt(ctx.argString) > queue.player.queue.size + parseInt(ctx.argString) > queue.player.queue.size + 1 ) { await ctx.message.reply({ embeds: [ @@ -80,8 +80,8 @@ export default class Remove extends Command { }); } else { const position = parseInt(ctx.argString); - const track = queue.player.queue.get(position); - const _remove = queue.player.queue.remove(position); + const track = queue.player.queue.get(position - 1); + const _remove = queue.player.queue.remove(position - 1); await ctx.message.reply({ embeds: [ diff --git a/interactions/music/queue.tsx b/interactions/music/queue.tsx index 4604c52..7fcbb6a 100644 --- a/interactions/music/queue.tsx +++ b/interactions/music/queue.tsx @@ -8,7 +8,7 @@ import { MessageComponentInteraction, } from "harmony"; import { emoji } from "emoji"; -import { queues } from "queue"; +import { playerEventHandlers, queues } from "queue"; import { formatMs } from "tools"; export async function button(i: MessageComponentInteraction) { @@ -66,7 +66,10 @@ export async function button(i: MessageComponentInteraction) { icon_url: i.client.user!.avatarURL(), }, title: "Server queue", - description: queue.player.queue.tracks + description: [ + queue.player.current, + ...queue.player.queue.tracks, + ] .slice(startingValue, startingValue + 10) .map( ({ title, url }, index) => @@ -83,9 +86,7 @@ export async function button(i: MessageComponentInteraction) { icon_url: i.user.avatarURL(), text: `Songs in queue: ${queue.player.queue.size} | Length: ${ - formatMs( - queue.queueLength, - ) + formatMs(queue.queueLength) }`, }, }).setColor("random"),