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:
apepenkov 2020-10-03 19:47:48 +03:00 committed by GitHub
parent 37834c9ee8
commit b24aa6a29d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -54,7 +54,7 @@ class Button:
))
@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.
@ -72,7 +72,7 @@ class Button:
if len(data) > 64:
raise ValueError('Too many bytes for the data')
return types.KeyboardButtonCallback(text, data)
return types.KeyboardButtonCallback(text, data, requires_password)
@staticmethod
def switch_inline(text, query='', same_peer=False):