From 62cb2a9a06b46d3529ae493f9e5e0b05d53efac0 Mon Sep 17 00:00:00 2001 From: Kaveen Kumarasinghe Date: Thu, 2 Mar 2023 02:10:33 -0500 Subject: [PATCH] fix some transcribe bugs --- cogs/transcription_service_cog.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/cogs/transcription_service_cog.py b/cogs/transcription_service_cog.py index 65493ed..6bf1cee 100644 --- a/cogs/transcription_service_cog.py +++ b/cogs/transcription_service_cog.py @@ -89,12 +89,12 @@ class TranscribeService(discord.Cog, name="TranscribeService"): ) await paginator.respond(ctx.interaction) - await response_message.delete_original_response() + await response_message.delete() return - await response_message.edit_original_response(embed=EmbedStatics.build_transcribe_success_embed(response)) + await response_message.edit(embed=EmbedStatics.build_transcribe_success_embed(response)) except Exception as e: - await response_message.edit_original_response(embed=EmbedStatics.build_transcribe_failed_embed(str(e))) + await response_message.edit(embed=EmbedStatics.build_transcribe_failed_embed(str(e))) async def transcribe_file_command( @@ -129,6 +129,7 @@ class TranscribeService(discord.Cog, name="TranscribeService"): embed=EmbedStatics.build_transcribe_progress_embed() ) + try: response = await self.model.send_transcription_request( file, temperature, user_api_key @@ -149,13 +150,12 @@ class TranscribeService(discord.Cog, name="TranscribeService"): ) await paginator.respond(ctx.interaction) - await response_message.delete_original_response() - return - await response_message.edit_original_response( + await response_message.edit( embed=EmbedStatics.build_transcribe_success_embed(response) ) except Exception as e: - await response_message.edit_original_response( + traceback.print_exc() + await response_message.edit( embed=EmbedStatics.build_transcribe_failed_embed(str(e)) )