mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-25 19:03:46 +03:00
Implement click for KeyboardButtonGame
This commit is contained in:
parent
f16ed8235c
commit
de74711e82
|
@ -93,3 +93,11 @@ class MessageButton:
|
|||
))
|
||||
elif isinstance(self.button, types.KeyboardButtonUrl):
|
||||
return webbrowser.open(self.button.url)
|
||||
elif isinstance(self.button, types.KeyboardButtonGame):
|
||||
req = functions.messages.GetBotCallbackAnswerRequest(
|
||||
peer=self._chat, msg_id=self._msg_id, game=True
|
||||
)
|
||||
try:
|
||||
return await self._client(req)
|
||||
except BotTimeout:
|
||||
return None
|
||||
|
|
Loading…
Reference in New Issue
Block a user