mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-03 14:04:51 +00:00
Don't encode callback data when sending inline buttons
This commit is contained in:
parent
af937152a1
commit
46e19c395c
1 changed files with 2 additions and 2 deletions
|
|
@ -59,7 +59,7 @@ class InlineKeyboardButton(Object):
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
text: str,
|
text: str,
|
||||||
callback_data: str = None,
|
callback_data: bytes = None,
|
||||||
url: str = None,
|
url: str = None,
|
||||||
switch_inline_query: str = None,
|
switch_inline_query: str = None,
|
||||||
switch_inline_query_current_chat: str = None,
|
switch_inline_query_current_chat: str = None,
|
||||||
|
|
@ -102,7 +102,7 @@ class InlineKeyboardButton(Object):
|
||||||
|
|
||||||
def write(self):
|
def write(self):
|
||||||
if self.callback_data:
|
if self.callback_data:
|
||||||
return KeyboardButtonCallback(self.text, self.callback_data.encode())
|
return KeyboardButtonCallback(self.text, self.callback_data)
|
||||||
|
|
||||||
if self.url:
|
if self.url:
|
||||||
return KeyboardButtonUrl(self.text, self.url)
|
return KeyboardButtonUrl(self.text, self.url)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue