mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-02 11:10:18 +03:00
added requires_password to KeyboardButtonCallback
KeyboardButtonCallback now has bool flag requires_password, so I guess it shall be added to Button.inline
This commit is contained in:
parent
37834c9ee8
commit
b24aa6a29d
|
@ -54,7 +54,7 @@ class Button:
|
||||||
))
|
))
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def inline(text, data=None):
|
def inline(text, data=None, requires_password=False):
|
||||||
"""
|
"""
|
||||||
Creates a new inline button with some payload data in it.
|
Creates a new inline button with some payload data in it.
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ class Button:
|
||||||
if len(data) > 64:
|
if len(data) > 64:
|
||||||
raise ValueError('Too many bytes for the data')
|
raise ValueError('Too many bytes for the data')
|
||||||
|
|
||||||
return types.KeyboardButtonCallback(text, data)
|
return types.KeyboardButtonCallback(text, data, requires_password)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def switch_inline(text, query='', same_peer=False):
|
def switch_inline(text, query='', same_peer=False):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user