This commit is contained in:
Devesh Pal 2021-07-05 22:40:57 +05:30 committed by GitHub
parent 5b6305f64a
commit d55950af6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -49,7 +49,6 @@ class Button:
Returns `True` if the button belongs to an inline keyboard. Returns `True` if the button belongs to an inline keyboard.
""" """
return isinstance(button, ( return isinstance(button, (
types.KeyboardButtonBuy,
types.KeyboardButtonCallback, types.KeyboardButtonCallback,
types.KeyboardButtonSwitchInline, types.KeyboardButtonSwitchInline,
types.KeyboardButtonUrl, types.KeyboardButtonUrl,
@ -164,18 +163,6 @@ class Button:
fwd_text=fwd_text fwd_text=fwd_text
) )
@staticmethod
def buy(text):
"""
Create a inline button to Buy a Product.
It can be only used with Invoice.
It should be the first button of the Invoice.
On Not using this, Telegram will Automatically add button to it.
Read More - https://core.telegram.org/api/payments
"""
return types.KeyboardButtonBuy(text)
@classmethod @classmethod
def text(cls, text, *, resize=None, single_use=None, selective=None): def text(cls, text, *, resize=None, single_use=None, selective=None):
""" """