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:
parent
9ba2ce76ee
commit
eebe3f8a1a
@ -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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user