mirror of https://github.com/coddrago/Heroku
buttons
parent
09f1d40c33
commit
537a27776d
|
@ -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:
|
||||
"""
|
||||
|
|
|
@ -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"
|
||||
],
|
||||
|
|
Loading…
Reference in New Issue