fix(core): Handle rendering errors.

This commit is contained in:
2023-09-19 22:59:01 +03:00
parent c63027f20e
commit 17683a7d96
7 changed files with 83 additions and 47 deletions

View File

@@ -386,8 +386,9 @@ class TimerCog(LionCog):
)
else:
# Display the timer status ephemerally
await ctx.interaction.response.defer(thinking=True, ephemeral=True)
status = await timer.current_status(with_notify=False, with_warnings=False)
await ctx.reply(**status.send_args, ephemeral=True)
await ctx.interaction.edit_original_response(**status.edit_args)
if error is not None:
await ctx.reply(embed=error, ephemeral=True)