From ddbb0c8da5c2a20dc90bfedba421411cf91d7af3 Mon Sep 17 00:00:00 2001 From: zebz213 Date: Wed, 10 Apr 2024 04:13:36 -0400 Subject: [PATCH 1/2] Fixed Search for PlayNext Command Fixed PlayNext slash command search feature. Signed-off-by: zebz213 --- src/events/client/InteractionCreate.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/events/client/InteractionCreate.ts b/src/events/client/InteractionCreate.ts index 03d6de6c5..da27702f6 100644 --- a/src/events/client/InteractionCreate.ts +++ b/src/events/client/InteractionCreate.ts @@ -197,7 +197,7 @@ export default class InteractionCreate extends Event { await interaction.reply({ content: `An error occurred: \`${error}\`` }); } } else if (interaction.type == InteractionType.ApplicationCommandAutocomplete) { - if (interaction.commandName == 'play') { + if ((interaction.commandName == 'play') || (interaction.commandName == 'playnext')) { const song = interaction.options.getString('song'); const res = await this.client.queue.search(song); let songs = []; From 016f65549b02a4a4c5cd23bf522b8216578c52f1 Mon Sep 17 00:00:00 2001 From: zebz213 Date: Thu, 11 Apr 2024 17:23:05 -0400 Subject: [PATCH 2/2] Added artist to search Added the artist/author to the search results to help with song selection. Signed-off-by: zebz213 --- src/events/client/InteractionCreate.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/events/client/InteractionCreate.ts b/src/events/client/InteractionCreate.ts index da27702f6..2c48b8cef 100644 --- a/src/events/client/InteractionCreate.ts +++ b/src/events/client/InteractionCreate.ts @@ -206,7 +206,7 @@ export default class InteractionCreate extends Event { if (!res.data.length) return; res.data.slice(0, 10).forEach(x => { songs.push({ - name: x.info.title, + name: `${x.info.title} by ${x.info.author}`, value: x.info.uri, }); });