From 93e44db8e7c05e5396f82084eb6fac755e717a78 Mon Sep 17 00:00:00 2001 From: "hikari.ftg" Date: Tue, 5 Apr 2022 17:38:43 +0000 Subject: [PATCH] Minor bug fixes --- hikka/dispatcher.py | 6 +++--- hikka/inline/list.py | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/hikka/dispatcher.py b/hikka/dispatcher.py index 06b239b..2e484d0 100755 --- a/hikka/dispatcher.py +++ b/hikka/dispatcher.py @@ -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"🚫 Command {utils.escape_html(message.message)} failed!\n\n" f"⛑ Traceback:\n{exc}" @@ -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""" diff --git a/hikka/inline/list.py b/hikka/inline/list.py index e9974c0..b1a7351 100644 --- a/hikka/inline/list.py +++ b/hikka/inline/list.py @@ -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: