Skip to content

Commit

Permalink
Merge pull request #780 from Kropatz/fix_removesong
Browse files Browse the repository at this point in the history
Make removesong work again
  • Loading branch information
appujet authored Jan 17, 2025
2 parents f8da594 + 6c13ff8 commit 5fd5855
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/commands/playlist/RemoveSong.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,20 +75,20 @@ export default class RemoveSong extends Command {
return await ctx.sendMessage({ embeds: [playlistNotFoundError] });
}

/* const res = await client.queue.search(song);
const res = await client.manager.search(song, ctx.author);

if (!res || res.loadType !== LoadType.TRACK) {
if (!res || res.loadType !== "track") {
const noSongsFoundError = this.client
.embed()
.setDescription(ctx.locale("cmd.removesong.messages.song_not_found"))
.setColor(this.client.color.red);
return await ctx.sendMessage({ embeds: [noSongsFoundError] });
}

const trackToRemove = res.data;
const trackToRemove = res.tracks[0];

try {
await client.db.removeSong(ctx.author.id, playlist, trackToRemove.encoded);
await client.db.removeSong(ctx.author!.id, playlist, trackToRemove.encoded!);

const successMessage = this.client
.embed()
Expand All @@ -107,7 +107,7 @@ export default class RemoveSong extends Command {
.setDescription(ctx.locale("cmd.removesong.messages.error_occurred"))
.setColor(this.client.color.red);
return await ctx.sendMessage({ embeds: [genericError] });
} */
}
}
public async autocomplete(interaction: AutocompleteInteraction): Promise<void> {
const focusedValue = interaction.options.getFocused();
Expand Down

0 comments on commit 5fd5855

Please sign in to comment.