X Tutup
Skip to content

Commit f3b8a3a

Browse files
committed
Merge remote-tracking branch 'origin/october3' into october3
2 parents 9e9309e + e8a34d8 commit f3b8a3a

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

telegram/bot.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1432,14 +1432,12 @@ def getChatMember(self, chat_id, user_id, **kwargs):
14321432
the definitive timeout (in seconds) for urlopen() operations.
14331433
14341434
Returns:
1435-
:class:`telegram.ChatMember`: On success,
1436-
:class:`telegram.ChatMember` is returned.
1435+
:class:`telegram.ChatMember`
14371436
14381437
Raises:
14391438
:class:`telegram.TelegramError`
14401439
14411440
"""
1442-
14431441
url = '{0}/getChatMember'.format(self.base_url)
14441442

14451443
data = {'chat_id': chat_id, 'user_id': user_id}
@@ -1449,6 +1447,14 @@ def getChatMember(self, chat_id, user_id, **kwargs):
14491447
return ChatMember.de_json(result, self)
14501448

14511449
def getWebhookInfo(self, **kwargs):
1450+
"""Use this method to get current webhook status.
1451+
1452+
If the bot is using getUpdates, will return an object with the url field empty.
1453+
1454+
Returns:
1455+
:class: `telegram.WebhookInfo`
1456+
1457+
"""
14521458
url = '{0}/getWebhookInfo'.format(self.base_url)
14531459

14541460
data = {}
@@ -1475,7 +1481,7 @@ def __reduce__(self):
14751481
return (self.__class__, (self.token, self.base_url.replace(self.token, ''),
14761482
self.base_file_url.replace(self.token, '')))
14771483

1478-
# snake_case (PEP8) aliases
1484+
# snake_case (PEP8) aliases
14791485

14801486
get_me = getMe
14811487
send_message = sendMessage

telegram/webhookinfo.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,19 @@ class WebhookInfo(TelegramObject):
2525
"""This object represents a Telegram WebhookInfo.
2626
2727
Attributes:
28-
url (str): Webhook URL, may be empty if webhook is not set up
28+
url (str): Webhook URL, may be empty if webhook is not set up.
2929
has_custom_certificate (bool):
3030
pending_update_count (int):
3131
last_error_date (Optional[int]):
3232
last_error_message (Optional[str]):
3333
3434
Args:
35-
url (str): Webhook URL, may be empty if webhook is not set up
35+
url (str): Webhook URL, may be empty if webhook is not set up.
3636
has_custom_certificate (bool):
3737
pending_update_count (int):
3838
last_error_date (Optional[int]):
3939
last_error_message (Optional[str]):
40+
4041
"""
4142

4243
def __init__(self, url, has_custom_certificate, pending_update_count, **kwargs):
@@ -56,6 +57,7 @@ def de_json(data, bot):
5657
5758
Returns:
5859
telegram.WebhookInfo:
60+
5961
"""
6062
if not data:
6163
return None

0 commit comments

Comments
 (0)
X Tutup