From ab0e362ea01eec8aa437bf49faeccca31eaf497c Mon Sep 17 00:00:00 2001 From: Stijn van der Kolk Date: Sat, 4 May 2024 00:04:17 +0200 Subject: [PATCH] fix(nowplaying): hopefully fix error --- src/commands/nowPlaying.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/commands/nowPlaying.ts b/src/commands/nowPlaying.ts index 8fbd27d..eadb99f 100644 --- a/src/commands/nowPlaying.ts +++ b/src/commands/nowPlaying.ts @@ -276,9 +276,12 @@ export default createCommand(NowPlayingCommand) collector.on('end', async (buttonInteractions) => { const userCache = cache.get(statsfmUser.id); if (userCache) userCache.delete(currentlyPlaying.track.id); - const lastInteraction = buttonInteractions.last(); - if (lastInteraction) { - const message = await lastInteraction.fetchReply(); + const lastButtonInteraction = buttonInteractions.last(); + if (lastButtonInteraction) { + await lastButtonInteraction.update({ + components: [], + }); + } else { await message.edit({ components: [], });