Skip to content

Commit

Permalink
Merge pull request #534 from zebz213/PlayNext-Search
Browse files Browse the repository at this point in the history
feat(playnext#autocomplete): Autocompletion searching for command `playnext` along with the track artist
  • Loading branch information
Xenofic authored Apr 12, 2024
2 parents 59aba39 + 016f655 commit febc573
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/events/client/InteractionCreate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [];
Expand All @@ -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,
});
});
Expand Down

0 comments on commit febc573

Please sign in to comment.