Minor bug fixes

pull/1/head
hikari.ftg 2022-04-05 17:38:43 +00:00
parent 179f12d9ca
commit 93e44db8e7
2 changed files with 5 additions and 3 deletions

View File

@ -364,9 +364,9 @@ class CommandDispatcher:
return
try:
exc = traceback.format_tb(e.__traceback__)
exc = traceback.format_exc()
# Remove `Traceback (most recent call last):`
exc = "\n".join(exc.split("\n")[1:])
exc = "\n".join(exc.splitlines()[1:])
txt = (
f"<b>🚫 Command</b> <code>{utils.escape_html(message.message)}</code><b> failed!</b>\n\n"
f"<b>⛑ Traceback:</b>\n<code>{exc}</code>"
@ -376,7 +376,7 @@ class CommandDispatcher:
pass
async def watcher_exc(self, e, message) -> None:
logging.error(f"Error running watcher. {traceback.format_tb(e.__traceback__)}")
logging.exception(f"Error running watcher")
async def handle_incoming(self, event):
"""Handle all incoming messages"""

View File

@ -216,6 +216,7 @@ class List(InlineUnit):
text=self._lists[list_uid]["strings"][
self._lists[list_uid]["current_index"]
],
parse_mode="HTML",
reply_markup=self._list_markup(list_uid),
)
except RetryAfter as e:
@ -271,6 +272,7 @@ class List(InlineUnit):
text=self._lists[list_uid]["strings"][
self._lists[list_uid]["current_index"]
],
parse_mode="HTML",
reply_markup=self._list_markup(list_uid),
)
except RetryAfter as e: