mirror of
https://github.com/Nick80835/microbot
synced 2025-09-01 23:15:45 +00:00
less ugly error messages
This commit is contained in:
@@ -153,7 +153,7 @@ class CommandHandler():
|
|||||||
try:
|
try:
|
||||||
await value["function"](event)
|
await value["function"](event)
|
||||||
except Exception as exception:
|
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
|
raise exception
|
||||||
|
|
||||||
async def fallback_inline(self, event):
|
async def fallback_inline(self, event):
|
||||||
@@ -199,7 +199,7 @@ class CommandHandler():
|
|||||||
if event.from_id in value["lockedusers"]:
|
if event.from_id in value["lockedusers"]:
|
||||||
value["lockedusers"].remove(event.from_id)
|
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
|
raise exception
|
||||||
|
|
||||||
async def check_privs(self, event, value):
|
async def check_privs(self, event, value):
|
||||||
|
Reference in New Issue
Block a user