mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-16 12:51:18 +00:00
Fix Inline buttons parsing
This commit is contained in:
parent
921800f902
commit
f0138ce555
@ -110,21 +110,21 @@ class InlineKeyboardButton(PyrogramType):
|
||||
)
|
||||
|
||||
def write(self):
|
||||
if self.callback_data:
|
||||
if self.callback_data is not None:
|
||||
return KeyboardButtonCallback(text=self.text, data=self.callback_data)
|
||||
|
||||
if self.url:
|
||||
if self.url is not None:
|
||||
return KeyboardButtonUrl(text=self.text, url=self.url)
|
||||
|
||||
if self.switch_inline_query:
|
||||
if self.switch_inline_query is not None:
|
||||
return KeyboardButtonSwitchInline(text=self.text, query=self.switch_inline_query)
|
||||
|
||||
if self.switch_inline_query_current_chat:
|
||||
if self.switch_inline_query_current_chat is not None:
|
||||
return KeyboardButtonSwitchInline(
|
||||
text=self.text,
|
||||
query=self.switch_inline_query_current_chat,
|
||||
same_peer=True
|
||||
)
|
||||
|
||||
if self.callback_game:
|
||||
if self.callback_game is not None:
|
||||
return KeyboardButtonGame(text=self.text)
|
||||
|
Loading…
Reference in New Issue
Block a user