1
0
Fork 0
mirror of https://github.com/myned/modufur.git synced 2024-12-25 06:37:29 +00:00

Fix errors not sending after interaction

This commit is contained in:
Myned 2022-02-21 13:38:38 -06:00
parent aecb10d3f2
commit 189dc23e82
No known key found for this signature in database
GPG key ID: 33790F979F7A28B8
2 changed files with 5 additions and 1 deletions

View file

@ -70,7 +70,11 @@ async def on_reverse_error(event):
error = '**An unknown SauceNAO error has occurred. The service may be down.**' error = '**An unknown SauceNAO error has occurred. The service may be down.**'
if error: if error:
try:
await event.context.respond(error) await event.context.respond(error)
except:
await event.context.interaction.edit_initial_response(error, components=None)
return True return True
async def _reverse(context, urls, *, selector=None): async def _reverse(context, urls, *, selector=None):

2
run.py
View file

@ -24,7 +24,7 @@ async def on_error(event):
try: try:
await event.context.respond(c.ERROR) await event.context.respond(c.ERROR)
except: except:
pass await event.context.interaction.edit_initial_response(c.ERROR, components=None)
raise event.exception raise event.exception