[+] fixed button text

pull/138/head
ZetGo | Aleksej K. 2025-05-24 15:05:19 +03:00
parent 6a1804aa21
commit a4f7495eb1
2 changed files with 9 additions and 9 deletions

View File

@ -125,14 +125,14 @@ class Utils(InlineUnit):
line += [ line += [
InlineKeyboardButton( InlineKeyboardButton(
text=button["text"], text=str(button["text"]),
url=button["url"], url=button["url"],
) )
] ]
elif "callback" in button: elif "callback" in button:
line += [ line += [
InlineKeyboardButton( InlineKeyboardButton(
text=button["text"], text=str(button["text"]),
callback_data=button["_callback_data"], callback_data=button["_callback_data"],
) )
] ]
@ -168,7 +168,7 @@ class Utils(InlineUnit):
elif "input" in button: elif "input" in button:
line += [ line += [
InlineKeyboardButton( InlineKeyboardButton(
text=button["text"], text=str(button["text"]),
switch_inline_query_current_chat=button["_switch_query"] switch_inline_query_current_chat=button["_switch_query"]
+ " ", + " ",
) )
@ -176,14 +176,14 @@ class Utils(InlineUnit):
elif "data" in button: elif "data" in button:
line += [ line += [
InlineKeyboardButton( InlineKeyboardButton(
text=button["text"], text=str(button["text"]),
callback_data=button["data"], callback_data=button["data"],
) )
] ]
elif "web_app" in button: elif "web_app" in button:
line += [ line += [
InlineKeyboardButton( InlineKeyboardButton(
text=button["text"], text=str(button["text"]),
web_app=WebAppInfo(button["data"]), web_app=WebAppInfo(button["data"]),
) )
] ]
@ -191,7 +191,7 @@ class Utils(InlineUnit):
elif "copy" in button: elif "copy" in button:
line += [ line += [
InlineKeyboardButton( InlineKeyboardButton(
text=button["text"], text=str(button["text"]),
copy_text=CopyTextButton( copy_text=CopyTextButton(
text=button["copy"] text=button["copy"]
) )
@ -201,7 +201,7 @@ class Utils(InlineUnit):
elif "switch_inline_query_current_chat" in button: elif "switch_inline_query_current_chat" in button:
line += [ line += [
InlineKeyboardButton( InlineKeyboardButton(
text=button["text"], text=str(button["text"]),
switch_inline_query_current_chat=button[ switch_inline_query_current_chat=button[
"switch_inline_query_current_chat" "switch_inline_query_current_chat"
], ],
@ -210,7 +210,7 @@ class Utils(InlineUnit):
elif "switch_inline_query" in button: elif "switch_inline_query" in button:
line += [ line += [
InlineKeyboardButton( InlineKeyboardButton(
text=button["text"], text=str(button["text"]),
switch_inline_query_current_chat=button[ switch_inline_query_current_chat=button[
"switch_inline_query" "switch_inline_query"
], ],

View File

@ -503,7 +503,7 @@ class Web:
markup = InlineKeyboardMarkup() markup = InlineKeyboardMarkup()
markup.add( markup.add(
InlineKeyboardButton( InlineKeyboardButton(
"🔓 Authorize user", text="🔓 Authorize user",
callback_data=f"authorize_web_{token}", callback_data=f"authorize_web_{token}",
) )
) )