diff --git a/heroku/inline/core.py b/heroku/inline/core.py index 6685469..2bd36d5 100644 --- a/heroku/inline/core.py +++ b/heroku/inline/core.py @@ -208,9 +208,9 @@ class InlineManager( async def _stop(self): """Stop the bot""" - self._task.cancel() - self._dp.stop_polling() - self._cleaner_task.cancel() + await self._task.cancel() + await self._dp.stop_polling() + await self._cleaner_task.cancel() def pop_web_auth_token(self, token: str) -> bool: """ diff --git a/heroku/inline/utils.py b/heroku/inline/utils.py index 03c84a5..fde7b23 100644 --- a/heroku/inline/utils.py +++ b/heroku/inline/utils.py @@ -124,14 +124,14 @@ class Utils(InlineUnit): line += [ InlineKeyboardButton( - button["text"], + text=button["text"], url=button["url"], ) ] elif "callback" in button: line += [ InlineKeyboardButton( - button["text"], + text=button["text"], callback_data=button["_callback_data"], ) ] @@ -167,7 +167,7 @@ class Utils(InlineUnit): elif "input" in button: line += [ InlineKeyboardButton( - button["text"], + text=button["text"], switch_inline_query_current_chat=button["_switch_query"] + " ", ) @@ -175,14 +175,14 @@ class Utils(InlineUnit): elif "data" in button: line += [ InlineKeyboardButton( - button["text"], + text=button["text"], callback_data=button["data"], ) ] elif "web_app" in button: line += [ InlineKeyboardButton( - button["text"], + text=button["text"], web_app=WebAppInfo(button["data"]), ) ] @@ -190,7 +190,7 @@ class Utils(InlineUnit): elif "copy" in button: line += [ InlineKeyboardButton( - button["text"], + text=button["text"], copy = button["copy"] ) ] @@ -198,7 +198,7 @@ class Utils(InlineUnit): elif "switch_inline_query_current_chat" in button: line += [ InlineKeyboardButton( - button["text"], + text=button["text"], switch_inline_query_current_chat=button[ "switch_inline_query_current_chat" ], @@ -207,7 +207,7 @@ class Utils(InlineUnit): elif "switch_inline_query" in button: line += [ InlineKeyboardButton( - button["text"], + text=button["text"], switch_inline_query_current_chat=button[ "switch_inline_query" ],