Skip to content

Commit

Permalink
Fix crash on reaction add/remove
Browse files Browse the repository at this point in the history
  • Loading branch information
TheSainEyereg committed Jul 11, 2024
1 parent ca1a6f6 commit 3713579
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/commands/music/Play.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ export default class Play extends Command {
const query = args.join(" ") || null;
const file = message.attachments.first() || null;

await message.react("⏱️");
await message.react("⏱️").catch(() => null);
message.reply({ embeds: [await this.play(message.channel as BaseGuildTextChannel, message.member!, { query, file })] });
await message.reactions.cache.get("⏱️")?.remove();
await message.reactions.cache.get("⏱️")?.remove().catch(() => null);
};

private async play(textChannel: BaseGuildTextChannel, member: GuildMember, source: {query: string | null; file: Attachment | null}) {
Expand Down

0 comments on commit 3713579

Please sign in to comment.