Skip to content

Commit 7cf5009

Browse files
committed
small documentation fixes
1 parent 9b74625 commit 7cf5009

2 files changed

Lines changed: 17 additions & 10 deletions

File tree

telegram/inlinekeyboardbutton.py

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,26 @@ class InlineKeyboardButton(TelegramObject):
3030
url (str):
3131
callback_data (str):
3232
switch_inline_query (str):
33-
switch_inline_query_current_chat (Optional[str]):
34-
callback_game (Optional[:class:`telegram.CallbackGame`]):
33+
switch_inline_query_current_chat (str):
34+
callback_game (:class:`telegram.CallbackGame`):
3535
3636
Args:
37-
text (str):
37+
text (str): Label text on the button.
3838
**kwargs: Arbitrary keyword arguments.
3939
4040
Keyword Args:
41-
url (Optional[str]):
42-
callback_data (Optional[str]):
43-
switch_inline_query (Optional[str]):
44-
switch_inline_query_current_chat (Optional[str]):
45-
callback_game (Optional[:class:`telegram.CallbackGame`]):
41+
url (Optional[str]): HTTP url to be opened when button is pressed.
42+
callback_data (Optional[str]): Data to be sent in a callback query to the bot when button
43+
is pressed, 1-64 bytes.
44+
switch_inline_query (Optional[str]): If set, pressing the button will prompt the user to
45+
select one of their chats, open that chat and insert the bot's username and the
46+
specified inline query in the input field. Can be empty, in which case just the bot's
47+
username will be inserted.
48+
switch_inline_query_current_chat (Optional[str]): If set, pressing the button will insert
49+
the bot's username and the specified inline query in the current chat's input field.
50+
Can be empty, in which case only the bot's username will be inserted.
51+
callback_game (Optional[:class:`telegram.CallbackGame`]): Description of the game that will
52+
be launched when the user presses the button.
4653
4754
"""
4855

telegram/webhookinfo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ class WebhookInfo(TelegramObject):
2828
url (str): Webhook URL, may be empty if webhook is not set up.
2929
has_custom_certificate (bool):
3030
pending_update_count (int):
31-
last_error_date (Optional[int]):
32-
last_error_message (Optional[str]):
31+
last_error_date (int):
32+
last_error_message (str):
3333
3434
Args:
3535
url (str): Webhook URL, may be empty if webhook is not set up.

0 commit comments

Comments
 (0)