Update some types description

This commit is contained in:
KurimuzonAkuma 2024-10-24 13:26:01 +03:00
parent 40e2afeeff
commit 5c57e177da
2 changed files with 9 additions and 5 deletions

View File

@ -45,6 +45,7 @@ class SendStarGift:
star_gift_id (``int``):
Unique identifier of star gift.
To get all available star gifts use :meth:`~pyrogram.Client.get_star_gifts`.
text (``str``, *optional*):
Text of the message to be sent.

View File

@ -74,11 +74,14 @@ class InlineKeyboardButton(Object):
A button that asks for the 2-step verification password of the current user and then sends a callback query to a bot Data to be sent to the bot via a callback query.
pay (``bool``, *optional*):
Change text of pay button.
Pass True, to send a Pay button.
Substrings `` and `XTR` in the buttons's text will be replaced with a Telegram Star icon.
Available in :meth:`~pyrogram.Client.send_invoice`.
**NOTE**: This type of button **must** always be the first button in the first row and can only be used in invoice messages.
copy_text (``str``, *optional*):
Text to copy.
A button that copies specified text to clipboard.
Limited to 256 character.
"""
@ -177,7 +180,7 @@ class InlineKeyboardButton(Object):
text=b.text,
pay=True
)
if isinstance(b, raw.types.KeyboardButtonCopy):
return InlineKeyboardButton(
text=b.text,
@ -239,7 +242,7 @@ class InlineKeyboardButton(Object):
if self.pay is not None:
return raw.types.KeyboardButtonBuy(text=self.text)
if self.copy_text is not None:
return raw.types.KeyboardButtonCopy(
text=self.text,