From 30f1cb48e6739f867ee37c83b3f857d7517c31dc Mon Sep 17 00:00:00 2001 From: Snazzah Date: Sun, 27 Oct 2024 00:20:28 -0500 Subject: [PATCH] fix(bot/autorecord): ensure recording has proper state on error --- apps/bot/src/modules/autorecord.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/bot/src/modules/autorecord.ts b/apps/bot/src/modules/autorecord.ts index 68bb3b4..73eb8d6 100644 --- a/apps/bot/src/modules/autorecord.ts +++ b/apps/bot/src/modules/autorecord.ts @@ -233,8 +233,11 @@ export default class AutorecordModule extends DexareModule {}); + if (recording.state !== RecordingState.ERROR) { + recording.state = RecordingState.ERROR; + await recording.stop(true).catch(() => {}); + } + if (recording.messageID && recording.messageChannelID) await this.client.bot .editMessage(recording.messageChannelID, recording.messageID, {