Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions telegram/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -1156,7 +1156,7 @@ def get_user_profile_photos(self, user_id, offset=None, limit=100, timeout=None,

data = {'user_id': user_id}

if offset:
if offset is not None:
data['offset'] = offset
if limit:
data['limit'] = limit
Expand Down Expand Up @@ -1438,8 +1438,8 @@ def edit_message_caption(self,
"""

if inline_message_id is None and (chat_id is None or message_id is None):
raise TelegramError(
'editMessageCaption: Both chat_id and message_id are required when '
raise ValueError(
'edit_message_caption: Both chat_id and message_id are required when '
'inline_message_id is not specified')

url = '{0}/editMessageCaption'.format(self.base_url)
Expand Down Expand Up @@ -1494,8 +1494,8 @@ def edit_message_reply_markup(self,
"""

if inline_message_id is None and (chat_id is None or message_id is None):
raise TelegramError(
'editMessageCaption: Both chat_id and message_id are required when '
raise ValueError(
'edit_message_reply_markup: Both chat_id and message_id are required when '
'inline_message_id is not specified')

url = '{0}/editMessageReplyMarkup'.format(self.base_url)
Expand Down