2
0
mirror of https://github.com/Nick80835/microbot synced 2025-08-29 05:29:16 +00:00

less ugly error messages

This commit is contained in:
Nick80835 2020-09-11 20:02:43 -04:00
parent 9ba2ce76ee
commit eebe3f8a1a

View File

@ -153,7 +153,7 @@ class CommandHandler():
try:
await value["function"](event)
except Exception as exception:
await event.reply(f"`An error occurred in {value['function'].__name__}: {exception}`")
await event.reply(f"An error occurred in **{value['function'].__name__}**: `{exception}`")
raise exception
async def fallback_inline(self, event):
@ -199,7 +199,7 @@ class CommandHandler():
if event.from_id in value["lockedusers"]:
value["lockedusers"].remove(event.from_id)
await event.reply(f"`An error occurred in {value['function'].__name__}: {exception}`")
await event.reply(f"An error occurred in **{value['function'].__name__}**: `{exception}`")
raise exception
async def check_privs(self, event, value):