mirror of https://github.com/coddrago/Heroku
buttons
parent
09f1d40c33
commit
537a27776d
|
@ -208,9 +208,9 @@ class InlineManager(
|
||||||
|
|
||||||
async def _stop(self):
|
async def _stop(self):
|
||||||
"""Stop the bot"""
|
"""Stop the bot"""
|
||||||
self._task.cancel()
|
await self._task.cancel()
|
||||||
self._dp.stop_polling()
|
await self._dp.stop_polling()
|
||||||
self._cleaner_task.cancel()
|
await self._cleaner_task.cancel()
|
||||||
|
|
||||||
def pop_web_auth_token(self, token: str) -> bool:
|
def pop_web_auth_token(self, token: str) -> bool:
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -124,14 +124,14 @@ class Utils(InlineUnit):
|
||||||
|
|
||||||
line += [
|
line += [
|
||||||
InlineKeyboardButton(
|
InlineKeyboardButton(
|
||||||
button["text"],
|
text=button["text"],
|
||||||
url=button["url"],
|
url=button["url"],
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
elif "callback" in button:
|
elif "callback" in button:
|
||||||
line += [
|
line += [
|
||||||
InlineKeyboardButton(
|
InlineKeyboardButton(
|
||||||
button["text"],
|
text=button["text"],
|
||||||
callback_data=button["_callback_data"],
|
callback_data=button["_callback_data"],
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
|
@ -167,7 +167,7 @@ class Utils(InlineUnit):
|
||||||
elif "input" in button:
|
elif "input" in button:
|
||||||
line += [
|
line += [
|
||||||
InlineKeyboardButton(
|
InlineKeyboardButton(
|
||||||
button["text"],
|
text=button["text"],
|
||||||
switch_inline_query_current_chat=button["_switch_query"]
|
switch_inline_query_current_chat=button["_switch_query"]
|
||||||
+ " ",
|
+ " ",
|
||||||
)
|
)
|
||||||
|
@ -175,14 +175,14 @@ class Utils(InlineUnit):
|
||||||
elif "data" in button:
|
elif "data" in button:
|
||||||
line += [
|
line += [
|
||||||
InlineKeyboardButton(
|
InlineKeyboardButton(
|
||||||
button["text"],
|
text=button["text"],
|
||||||
callback_data=button["data"],
|
callback_data=button["data"],
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
elif "web_app" in button:
|
elif "web_app" in button:
|
||||||
line += [
|
line += [
|
||||||
InlineKeyboardButton(
|
InlineKeyboardButton(
|
||||||
button["text"],
|
text=button["text"],
|
||||||
web_app=WebAppInfo(button["data"]),
|
web_app=WebAppInfo(button["data"]),
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
|
@ -190,7 +190,7 @@ class Utils(InlineUnit):
|
||||||
elif "copy" in button:
|
elif "copy" in button:
|
||||||
line += [
|
line += [
|
||||||
InlineKeyboardButton(
|
InlineKeyboardButton(
|
||||||
button["text"],
|
text=button["text"],
|
||||||
copy = button["copy"]
|
copy = button["copy"]
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
|
@ -198,7 +198,7 @@ class Utils(InlineUnit):
|
||||||
elif "switch_inline_query_current_chat" in button:
|
elif "switch_inline_query_current_chat" in button:
|
||||||
line += [
|
line += [
|
||||||
InlineKeyboardButton(
|
InlineKeyboardButton(
|
||||||
button["text"],
|
text=button["text"],
|
||||||
switch_inline_query_current_chat=button[
|
switch_inline_query_current_chat=button[
|
||||||
"switch_inline_query_current_chat"
|
"switch_inline_query_current_chat"
|
||||||
],
|
],
|
||||||
|
@ -207,7 +207,7 @@ class Utils(InlineUnit):
|
||||||
elif "switch_inline_query" in button:
|
elif "switch_inline_query" in button:
|
||||||
line += [
|
line += [
|
||||||
InlineKeyboardButton(
|
InlineKeyboardButton(
|
||||||
button["text"],
|
text=button["text"],
|
||||||
switch_inline_query_current_chat=button[
|
switch_inline_query_current_chat=button[
|
||||||
"switch_inline_query"
|
"switch_inline_query"
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in New Issue