From b24aa6a29d1c799d50c52febc143a1f90b8a9833 Mon Sep 17 00:00:00 2001 From: apepenkov <39992738+apepenkov@users.noreply.github.com> Date: Sat, 3 Oct 2020 19:47:48 +0300 Subject: [PATCH] added requires_password to KeyboardButtonCallback KeyboardButtonCallback now has bool flag requires_password, so I guess it shall be added to Button.inline --- telethon/tl/custom/button.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/telethon/tl/custom/button.py b/telethon/tl/custom/button.py index 1df7cdfa..03ee7390 100644 --- a/telethon/tl/custom/button.py +++ b/telethon/tl/custom/button.py @@ -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):