Fix docs warnings

This commit is contained in:
Alex Root Junior 2018-08-05 20:37:49 +03:00
parent 272cf155f2
commit 2c7a7dfce0
2 changed files with 155 additions and 147 deletions

View file

@ -54,7 +54,7 @@ class Bot(BaseBot):
:param destination: filename or instance of :class:`io.IOBase`. For e. g. :class:`io.BytesIO`
:param timeout: int
:param chunk_size: int
:param seek: bool - go to start of file when downloading is finished.
:param seek: bool - go to start of file when downloading is finished
:return: destination
"""
file = await self.get_file(file_id)
@ -78,15 +78,15 @@ class Bot(BaseBot):
Source: https://core.telegram.org/bots/api#getupdates
:param offset: Identifier of the first update to be returned.
:param offset: Identifier of the first update to be returned
:type offset: :obj:`typing.Union[base.Integer, None]`
:param limit: Limits the number of updates to be retrieved.
:param limit: Limits the number of updates to be retrieved
:type limit: :obj:`typing.Union[base.Integer, None]`
:param timeout: Timeout in seconds for long polling.
:param timeout: Timeout in seconds for long polling
:type timeout: :obj:`typing.Union[base.Integer, None]`
:param allowed_updates: List the types of updates you want your bot to receive.
:param allowed_updates: List the types of updates you want your bot to receive
:type allowed_updates: :obj:`typing.Union[typing.List[base.String], None]`
:return: An Array of Update objects is returned.
:return: An Array of Update objects is returned
:rtype: :obj:`typing.List[types.Update]`
"""
allowed_updates = prepare_arg(allowed_updates)
@ -109,14 +109,14 @@ class Bot(BaseBot):
:param url: HTTPS url to send updates to. Use an empty string to remove webhook integration
:type url: :obj:`base.String`
:param certificate: Upload your public key certificate so that the root certificate in use can be checked.
:param certificate: Upload your public key certificate so that the root certificate in use can be checked
:type certificate: :obj:`typing.Union[base.InputFile, None]`
:param max_connections: Maximum allowed number of simultaneous HTTPS connections to the webhook
for update delivery, 1-100.
:type max_connections: :obj:`typing.Union[base.Integer, None]`
:param allowed_updates: List the types of updates you want your bot to receive.
:param allowed_updates: List the types of updates you want your bot to receive
:type allowed_updates: :obj:`typing.Union[typing.List[base.String], None]`
:return: Returns true.
:return: Returns true
:rtype: :obj:`base.Boolean`
"""
allowed_updates = prepare_arg(allowed_updates)
@ -132,7 +132,7 @@ class Bot(BaseBot):
Source: https://core.telegram.org/bots/api#deletewebhook
:return: Returns True on success.
:return: Returns True on success
:rtype: :obj:`base.Boolean`
"""
payload = generate_payload(**locals())
@ -148,7 +148,7 @@ class Bot(BaseBot):
Source: https://core.telegram.org/bots/api#getwebhookinfo
:return: On success, returns a WebhookInfo object.
:return: On success, returns a WebhookInfo object
:rtype: :obj:`types.WebhookInfo`
"""
payload = generate_payload(**locals())
@ -165,7 +165,7 @@ class Bot(BaseBot):
Source: https://core.telegram.org/bots/api#getme
:return: Returns basic information about the bot in form of a User object.
:return: Returns basic information about the bot in form of a User object
:rtype: :obj:`types.User`
"""
payload = generate_payload(**locals())
@ -196,14 +196,14 @@ class Bot(BaseBot):
:type parse_mode: :obj:`typing.Union[base.String, None]`
:param disable_web_page_preview: Disables link previews for links in this message
:type disable_web_page_preview: :obj:`typing.Union[base.Boolean, None]`
:param disable_notification: Sends the message silently. Users will receive a notification with no sound.
:param disable_notification: Sends the message silently. Users will receive a notification with no sound
:type disable_notification: :obj:`typing.Union[base.Boolean, None]`
:param reply_to_message_id: If the message is a reply, ID of the original message
:type reply_to_message_id: :obj:`typing.Union[base.Integer, None]`
:param reply_markup: Additional interface options.
:param reply_markup: Additional interface options
:type reply_markup: :obj:`typing.Union[types.InlineKeyboardMarkup,
types.ReplyKeyboardMarkup, types.ReplyKeyboardRemove, types.ForceReply, None]`
:return: On success, the sent Message is returned.
:return: On success, the sent Message is returned
:rtype: :obj:`types.Message`
"""
reply_markup = prepare_arg(reply_markup)
@ -227,11 +227,11 @@ class Bot(BaseBot):
:type chat_id: :obj:`typing.Union[base.Integer, base.String]`
:param from_chat_id: Unique identifier for the chat where the original message was sent
:type from_chat_id: :obj:`typing.Union[base.Integer, base.String]`
:param disable_notification: Sends the message silently. Users will receive a notification with no sound.
:param disable_notification: Sends the message silently. Users will receive a notification with no sound
:type disable_notification: :obj:`typing.Union[base.Boolean, None]`
:param message_id: Message identifier in the chat specified in from_chat_id
:type message_id: :obj:`base.Integer`
:return: On success, the sent Message is returned.
:return: On success, the sent Message is returned
:rtype: :obj:`types.Message`
"""
payload = generate_payload(**locals())
@ -256,21 +256,21 @@ class Bot(BaseBot):
:param chat_id: Unique identifier for the target chat or username of the target channel
:type chat_id: :obj:`typing.Union[base.Integer, base.String]`
:param photo: Photo to send.
:param photo: Photo to send
:type photo: :obj:`typing.Union[base.InputFile, base.String]`
:param caption: Photo caption (may also be used when resending photos by file_id), 0-200 characters
:type caption: :obj:`typing.Union[base.String, None]`
:param parse_mode: Send Markdown or HTML, if you want Telegram apps to show bold, italic,
fixed-width text or inline URLs in your bot's message.
:type parse_mode: :obj:`typing.Union[base.String, None]`
:param disable_notification: Sends the message silently. Users will receive a notification with no sound.
:param disable_notification: Sends the message silently. Users will receive a notification with no sound
:type disable_notification: :obj:`typing.Union[base.Boolean, None]`
:param reply_to_message_id: If the message is a reply, ID of the original message
:type reply_to_message_id: :obj:`typing.Union[base.Integer, None]`
:param reply_markup: Additional interface options.
:param reply_markup: Additional interface options
:type reply_markup: :obj:`typing.Union[types.InlineKeyboardMarkup,
types.ReplyKeyboardMarkup, types.ReplyKeyboardRemove, types.ForceReply, None]`
:return: On success, the sent Message is returned.
:return: On success, the sent Message is returned
:rtype: :obj:`types.Message`
"""
reply_markup = prepare_arg(reply_markup)
@ -306,7 +306,7 @@ class Bot(BaseBot):
:param chat_id: Unique identifier for the target chat or username of the target channel
:type chat_id: :obj:`typing.Union[base.Integer, base.String]`
:param audio: Audio file to send.
:param audio: Audio file to send
:type audio: :obj:`typing.Union[base.InputFile, base.String]`
:param caption: Audio caption, 0-200 characters
:type caption: :obj:`typing.Union[base.String, None]`
@ -318,17 +318,17 @@ class Bot(BaseBot):
:param performer: Performer
:type performer: :obj:`typing.Union[base.String, None]`
:param title: Track name
:param thumb: Thumbnail of the file sent.
:param :obj:`typing.Union[base.InputFile, base.String, None]`
:type title: :obj:`typing.Union[base.String, None]`
:param disable_notification: Sends the message silently. Users will receive a notification with no sound.
:param thumb: Thumbnail of the file sent
:type thumb: :obj:`typing.Union[base.InputFile, base.String, None]`
:param disable_notification: Sends the message silently. Users will receive a notification with no sound
:type disable_notification: :obj:`typing.Union[base.Boolean, None]`
:param reply_to_message_id: If the message is a reply, ID of the original message
:type reply_to_message_id: :obj:`typing.Union[base.Integer, None]`
:param reply_markup: Additional interface options.
:type reply_markup: :obj:`typing.Union[types.InlineKeyboardMarkup,
types.ReplyKeyboardMarkup, types.ReplyKeyboardRemove, types.ForceReply, None]`
:return: On success, the sent Message is returned.
:param reply_markup: Additional interface options
:type reply_markup: :obj:`typing.Union[types.InlineKeyboardMarkup, types.ReplyKeyboardMarkup,
types.ReplyKeyboardRemove, types.ForceReply, None]`
:return: On success, the sent Message is returned
:rtype: :obj:`types.Message`
"""
reply_markup = prepare_arg(reply_markup)
@ -360,23 +360,23 @@ class Bot(BaseBot):
:param chat_id: Unique identifier for the target chat or username of the target channel
:type chat_id: :obj:`typing.Union[base.Integer, base.String]`
:param document: File to send.
:param document: File to send
:type document: :obj:`typing.Union[base.InputFile, base.String]`
:param thumb: Thumbnail of the file sent.
:param :obj:`typing.Union[base.InputFile, base.String, None]`
:param thumb: Thumbnail of the file sent
:type thumb: :obj:`typing.Union[base.InputFile, base.String, None]`
:param caption: Document caption (may also be used when resending documents by file_id), 0-200 characters
:type caption: :obj:`typing.Union[base.String, None]`
:param parse_mode: Send Markdown or HTML, if you want Telegram apps to show bold, italic,
fixed-width text or inline URLs in your bot's message.
:type parse_mode: :obj:`typing.Union[base.String, None]`
:param disable_notification: Sends the message silently. Users will receive a notification with no sound.
:param disable_notification: Sends the message silently. Users will receive a notification with no sound
:type disable_notification: :obj:`typing.Union[base.Boolean, None]`
:param reply_to_message_id: If the message is a reply, ID of the original message
:type reply_to_message_id: :obj:`typing.Union[base.Integer, None]`
:param reply_markup: Additional interface options.
:type reply_markup: :obj:`typing.Union[types.InlineKeyboardMarkup,
types.ReplyKeyboardMarkup, types.ReplyKeyboardRemove, types.ForceReply], None]`
:return: On success, the sent Message is returned.
:param reply_markup: Additional interface options
:type reply_markup: :obj:`typing.Union[types.InlineKeyboardMarkup, types.ReplyKeyboardMarkup,
types.ReplyKeyboardRemove, types.ForceReply], None]`
:return: On success, the sent Message is returned
:rtype: :obj:`types.Message`
"""
reply_markup = prepare_arg(reply_markup)
@ -411,7 +411,7 @@ class Bot(BaseBot):
:param chat_id: Unique identifier for the target chat or username of the target channel
:type chat_id: :obj:`typing.Union[base.Integer, base.String]`
:param video: Video to send.
:param video: Video to send
:type video: :obj:`typing.Union[base.InputFile, base.String]`
:param duration: Duration of sent video in seconds
:type duration: :obj:`typing.Union[base.Integer, None]`
@ -419,8 +419,8 @@ class Bot(BaseBot):
:type width: :obj:`typing.Union[base.Integer, None]`
:param height: Video height
:type height: :obj:`typing.Union[base.Integer, None]`
:param thumb: Thumbnail of the file sent.
:param :obj:`typing.Union[base.InputFile, base.String, None]`
:param thumb: Thumbnail of the file sent
:type thumb: :obj:`typing.Union[base.InputFile, base.String, None]`
:param caption: Video caption (may also be used when resending videos by file_id), 0-200 characters
:type caption: :obj:`typing.Union[base.String, None]`
:param parse_mode: Send Markdown or HTML, if you want Telegram apps to show bold, italic,
@ -428,14 +428,14 @@ class Bot(BaseBot):
:type parse_mode: :obj:`typing.Union[base.String, None]`
:param supports_streaming: Pass True, if the uploaded video is suitable for streaming
:type supports_streaming: :obj:`typing.Union[base.Boolean, None]`
:param disable_notification: Sends the message silently. Users will receive a notification with no sound.
:param disable_notification: Sends the message silently. Users will receive a notification with no sound
:type disable_notification: :obj:`typing.Union[base.Boolean, None]`
:param reply_to_message_id: If the message is a reply, ID of the original message
:type reply_to_message_id: :obj:`typing.Union[base.Integer, None]`
:param reply_markup: Additional interface options.
:param reply_markup: Additional interface options
:type reply_markup: :obj:`typing.Union[types.InlineKeyboardMarkup,
types.ReplyKeyboardMarkup, types.ReplyKeyboardRemove, types.ForceReply, None]`
:return: On success, the sent Message is returned.
:return: On success, the sent Message is returned
:rtype: :obj:`types.Message`
"""
reply_markup = prepare_arg(reply_markup)
@ -470,9 +470,12 @@ class Bot(BaseBot):
Source https://core.telegram.org/bots/api#sendanimation
:param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
:param chat_id: Unique identifier for the target chat or username of the target channel
(in the format @channelusername)
:type chat_id: :obj:`typing.Union[base.Integer, base.String]`
:param animation: Animation to send. Pass a file_id as String to send an animation that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an animation from the Internet, or upload a new animation using multipart/form-data.
:param animation: Animation to send. Pass a file_id as String to send an animation that exists
on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an animation
from the Internet, or upload a new animation using multipart/form-data
:type animation: :obj:`typing.Union[base.InputFile, base.String]`
:param duration: Duration of sent animation in seconds
:type duration: :obj:`typing.Union[base.Integer, None]`
@ -480,19 +483,23 @@ class Bot(BaseBot):
:type width: :obj:`typing.Union[base.Integer, None]`
:param height: Animation height
:type height: :obj:`typing.Union[base.Integer, None]`
:param thumb: Thumbnail of the file sent. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnails width and height should not exceed 90. Ignored if the file is not uploaded using multipart/form-data. Thumbnails cant be reused and can be only uploaded as a new file, so you can pass attach://<file_attach_name> if the thumbnail was uploaded using multipart/form-data under <file_attach_name>.
:param thumb: Thumbnail of the file sent. The thumbnail should be in JPEG format and less than 200 kB in size.
A thumbnails width and height should not exceed 90.
:type thumb: :obj:`typing.Union[typing.Union[base.InputFile, base.String], None]`
:param caption: Animation caption (may also be used when resending animation by file_id), 0-200 characters
:type caption: :obj:`typing.Union[base.String, None]`
:param parse_mode: Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.
:param parse_mode: Send Markdown or HTML, if you want Telegram apps to show bold, italic,
fixed-width text or inline URLs in the media caption
:type parse_mode: :obj:`typing.Union[base.String, None]`
:param disable_notification: Sends the message silently. Users will receive a notification with no sound.
:param disable_notification: Sends the message silently. Users will receive a notification with no sound
:type disable_notification: :obj:`typing.Union[base.Boolean, None]`
:param reply_to_message_id: If the message is a reply, ID of the original message
:type reply_to_message_id: :obj:`typing.Union[base.Integer, None]`
:param reply_markup: Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.
:type reply_markup: :obj:`typing.Union[typing.Union[types.InlineKeyboardMarkup, types.ReplyKeyboardMarkup, types.ReplyKeyboardRemove, types.ForceReply], None]`
:return: On success, the sent Message is returned.
:param reply_markup: Additional interface options. A JSON-serialized object for an inline keyboard,
custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user
:type reply_markup: :obj:`typing.Union[typing.Union[types.InlineKeyboardMarkup, types.ReplyKeyboardMarkup,
types.ReplyKeyboardRemove, types.ForceReply], None]`
:return: On success, the sent Message is returned
:rtype: :obj:`types.Message`
"""
reply_markup = prepare_arg(reply_markup)
@ -523,7 +530,7 @@ class Bot(BaseBot):
:param chat_id: Unique identifier for the target chat or username of the target channel
:type chat_id: :obj:`typing.Union[base.Integer, base.String]`
:param voice: Audio file to send.
:param voice: Audio file to send
:type voice: :obj:`typing.Union[base.InputFile, base.String]`
:param caption: Voice message caption, 0-200 characters
:type caption: :obj:`typing.Union[base.String, None]`
@ -532,14 +539,14 @@ class Bot(BaseBot):
:type parse_mode: :obj:`typing.Union[base.String, None]`
:param duration: Duration of the voice message in seconds
:type duration: :obj:`typing.Union[base.Integer, None]`
:param disable_notification: Sends the message silently. Users will receive a notification with no sound.
:param disable_notification: Sends the message silently. Users will receive a notification with no sound
:type disable_notification: :obj:`typing.Union[base.Boolean, None]`
:param reply_to_message_id: If the message is a reply, ID of the original message
:type reply_to_message_id: :obj:`typing.Union[base.Integer, None]`
:param reply_markup: Additional interface options.
:param reply_markup: Additional interface options
:type reply_markup: :obj:`typing.Union[types.InlineKeyboardMarkup,
types.ReplyKeyboardMarkup, types.ReplyKeyboardRemove, types.ForceReply, None]`
:return: On success, the sent Message is returned.
:return: On success, the sent Message is returned
:rtype: :obj:`types.Message`
"""
reply_markup = prepare_arg(reply_markup)
@ -570,22 +577,22 @@ class Bot(BaseBot):
:param chat_id: Unique identifier for the target chat or username of the target channel
:type chat_id: :obj:`typing.Union[base.Integer, base.String]`
:param video_note: Video note to send.
:param video_note: Video note to send
:type video_note: :obj:`typing.Union[base.InputFile, base.String]`
:param duration: Duration of sent video in seconds
:type duration: :obj:`typing.Union[base.Integer, None]`
:param length: Video width and height
:type length: :obj:`typing.Union[base.Integer, None]`
:param thumb: Thumbnail of the file sent.
:param :obj:`typing.Union[base.InputFile, base.String, None]`
:param disable_notification: Sends the message silently. Users will receive a notification with no sound.
:param thumb: Thumbnail of the file sent
:type thumb: :obj:`typing.Union[base.InputFile, base.String, None]`
:param disable_notification: Sends the message silently. Users will receive a notification with no sound
:type disable_notification: :obj:`typing.Union[base.Boolean, None]`
:param reply_to_message_id: If the message is a reply, ID of the original message
:type reply_to_message_id: :obj:`typing.Union[base.Integer, None]`
:param reply_markup: Additional interface options.
:type reply_markup: :obj:`typing.Union[types.InlineKeyboardMarkup,
types.ReplyKeyboardMarkup, types.ReplyKeyboardRemove, types.ForceReply, None]`
:return: On success, the sent Message is returned.
:param reply_markup: Additional interface options
:type reply_markup: :obj:`typing.Union[types.InlineKeyboardMarkup, types.ReplyKeyboardMarkup,
types.ReplyKeyboardRemove, types.ForceReply, None]`
:return: On success, the sent Message is returned
:rtype: :obj:`types.Message`
"""
reply_markup = prepare_arg(reply_markup)
@ -608,11 +615,11 @@ class Bot(BaseBot):
:type chat_id: :obj:`typing.Union[base.Integer, base.String]`
:param media: A JSON-serialized array describing photos and videos to be sent
:type media: :obj:`typing.Union[types.MediaGroup, typing.List]`
:param disable_notification: Sends the message silently. Users will receive a notification with no sound.
:param disable_notification: Sends the message silently. Users will receive a notification with no sound
:type disable_notification: :obj:`typing.Union[base.Boolean, None]`
:param reply_to_message_id: If the message is a reply, ID of the original message
:type reply_to_message_id: :obj:`typing.Union[base.Integer, None]`
:return: On success, an array of the sent Messages is returned.
:return: On success, an array of the sent Messages is returned
:rtype: typing.List[types.Message]
"""
# Convert list to MediaGroup
@ -650,14 +657,14 @@ class Bot(BaseBot):
:type longitude: :obj:`base.Float`
:param live_period: Period in seconds for which the location will be updated
:type live_period: :obj:`typing.Union[base.Integer, None]`
:param disable_notification: Sends the message silently. Users will receive a notification with no sound.
:param disable_notification: Sends the message silently. Users will receive a notification with no sound
:type disable_notification: :obj:`typing.Union[base.Boolean, None]`
:param reply_to_message_id: If the message is a reply, ID of the original message
:type reply_to_message_id: :obj:`typing.Union[base.Integer, None]`
:param reply_markup: Additional interface options.
:param reply_markup: Additional interface options
:type reply_markup: :obj:`typing.Union[types.InlineKeyboardMarkup,
types.ReplyKeyboardMarkup, types.ReplyKeyboardRemove, types.ForceReply, None]`
:return: On success, the sent Message is returned.
:return: On success, the sent Message is returned
:rtype: :obj:`types.Message`
"""
reply_markup = prepare_arg(reply_markup)
@ -679,7 +686,7 @@ class Bot(BaseBot):
Source: https://core.telegram.org/bots/api#editmessagelivelocation
:param chat_id: Required if inline_message_id is not specified.
:param chat_id: Required if inline_message_id is not specified
:type chat_id: :obj:`typing.Union[base.Integer, base.String, None]`
:param message_id: Required if inline_message_id is not specified. Identifier of the sent message
:type message_id: :obj:`typing.Union[base.Integer, None]`
@ -689,7 +696,7 @@ class Bot(BaseBot):
:type latitude: :obj:`base.Float`
:param longitude: Longitude of new location
:type longitude: :obj:`base.Float`
:param reply_markup: A JSON-serialized object for a new inline keyboard.
:param reply_markup: A JSON-serialized object for a new inline keyboard
:type reply_markup: :obj:`typing.Union[types.InlineKeyboardMarkup, None]`
:return: On success, if the edited message was sent by the bot, the edited Message is returned,
otherwise True is returned.
@ -716,13 +723,13 @@ class Bot(BaseBot):
Source: https://core.telegram.org/bots/api#stopmessagelivelocation
:param chat_id: Required if inline_message_id is not specified.
:param chat_id: Required if inline_message_id is not specified
:type chat_id: :obj:`typing.Union[base.Integer, base.String, None]`
:param message_id: Required if inline_message_id is not specified. Identifier of the sent message
:type message_id: :obj:`typing.Union[base.Integer, None]`
:param inline_message_id: Required if chat_id and message_id are not specified. Identifier of the inline message
:type inline_message_id: :obj:`typing.Union[base.String, None]`
:param reply_markup: A JSON-serialized object for a new inline keyboard.
:param reply_markup: A JSON-serialized object for a new inline keyboard
:type reply_markup: :obj:`typing.Union[types.InlineKeyboardMarkup, None]`
:return: On success, if the message was sent by the bot, the sent Message is returned,
otherwise True is returned.
@ -765,16 +772,16 @@ class Bot(BaseBot):
:type address: :obj:`base.String`
:param foursquare_id: Foursquare identifier of the venue
:type foursquare_id: :obj:`typing.Union[base.String, None]`
:param foursquare_type: Foursquare type of the venue, if known.
:param foursquare_type: Foursquare type of the venue, if known
:type foursquare_type: :obj:`typing.Union[base.String, None]`
:param disable_notification: Sends the message silently. Users will receive a notification with no sound.
:param disable_notification: Sends the message silently. Users will receive a notification with no sound
:type disable_notification: :obj:`typing.Union[base.Boolean, None]`
:param reply_to_message_id: If the message is a reply, ID of the original message
:type reply_to_message_id: :obj:`typing.Union[base.Integer, None]`
:param reply_markup: Additional interface options.
:param reply_markup: Additional interface options
:type reply_markup: :obj:`typing.Union[types.InlineKeyboardMarkup,
types.ReplyKeyboardMarkup, types.ReplyKeyboardRemove, types.ForceReply, None]`
:return: On success, the sent Message is returned.
:return: On success, the sent Message is returned
:rtype: :obj:`types.Message`
"""
reply_markup = prepare_arg(reply_markup)
@ -808,14 +815,14 @@ class Bot(BaseBot):
:type last_name: :obj:`typing.Union[base.String, None]`
:param vcard: vcard
:type vcard: :obj:`typing.Union[base.String, None]`
:param disable_notification: Sends the message silently. Users will receive a notification with no sound.
:param disable_notification: Sends the message silently. Users will receive a notification with no sound
:type disable_notification: :obj:`typing.Union[base.Boolean, None]`
:param reply_to_message_id: If the message is a reply, ID of the original message
:type reply_to_message_id: :obj:`typing.Union[base.Integer, None]`
:param reply_markup: Additional interface options.
:param reply_markup: Additional interface options
:type reply_markup: :obj:`typing.Union[types.InlineKeyboardMarkup,
types.ReplyKeyboardMarkup, types.ReplyKeyboardRemove, types.ForceReply, None]`
:return: On success, the sent Message is returned.
:return: On success, the sent Message is returned
:rtype: :obj:`types.Message`
"""
reply_markup = prepare_arg(reply_markup)
@ -838,9 +845,9 @@ class Bot(BaseBot):
:param chat_id: Unique identifier for the target chat or username of the target channel
:type chat_id: :obj:`typing.Union[base.Integer, base.String]`
:param action: Type of action to broadcast.
:param action: Type of action to broadcast
:type action: :obj:`base.String`
:return: Returns True on success.
:return: Returns True on success
:rtype: :obj:`base.Boolean`
"""
payload = generate_payload(**locals())
@ -857,11 +864,11 @@ class Bot(BaseBot):
:param user_id: Unique identifier of the target user
:type user_id: :obj:`base.Integer`
:param offset: Sequential number of the first photo to be returned. By default, all photos are returned.
:param offset: Sequential number of the first photo to be returned. By default, all photos are returned
:type offset: :obj:`typing.Union[base.Integer, None]`
:param limit: Limits the number of photos to be retrieved. Values between 1100 are accepted. Defaults to 100.
:param limit: Limits the number of photos to be retrieved. Values between 1100 are accepted. Defaults to 100
:type limit: :obj:`typing.Union[base.Integer, None]`
:return: Returns a UserProfilePhotos object.
:return: Returns a UserProfilePhotos object
:rtype: :obj:`types.UserProfilePhotos`
"""
payload = generate_payload(**locals())
@ -881,7 +888,7 @@ class Bot(BaseBot):
:param file_id: File identifier to get info about
:type file_id: :obj:`base.String`
:return: On success, a File object is returned.
:return: On success, a File object is returned
:rtype: :obj:`types.File`
"""
payload = generate_payload(**locals())
@ -908,9 +915,9 @@ class Bot(BaseBot):
:type chat_id: :obj:`typing.Union[base.Integer, base.String]`
:param user_id: Unique identifier of the target user
:type user_id: :obj:`base.Integer`
:param until_date: Date when the user will be unbanned, unix time.
:param until_date: Date when the user will be unbanned, unix time
:type until_date: :obj:`typing.Union[base.Integer, None]`
:return: Returns True on success.
:return: Returns True on success
:rtype: :obj:`base.Boolean`
"""
until_date = prepare_arg(until_date)
@ -933,7 +940,7 @@ class Bot(BaseBot):
:type chat_id: :obj:`typing.Union[base.Integer, base.String]`
:param user_id: Unique identifier of the target user
:type user_id: :obj:`base.Integer`
:return: Returns True on success.
:return: Returns True on success
:rtype: :obj:`base.Boolean`
"""
payload = generate_payload(**locals())
@ -959,7 +966,7 @@ class Bot(BaseBot):
:type chat_id: :obj:`typing.Union[base.Integer, base.String]`
:param user_id: Unique identifier of the target user
:type user_id: :obj:`base.Integer`
:param until_date: Date when restrictions will be lifted for the user, unix time.
:param until_date: Date when restrictions will be lifted for the user, unix time
:type until_date: :obj:`typing.Union[base.Integer, None]`
:param can_send_messages: Pass True, if the user can send text messages, contacts, locations and venues
:type can_send_messages: :obj:`typing.Union[base.Boolean, None]`
@ -972,7 +979,7 @@ class Bot(BaseBot):
:param can_add_web_page_previews: Pass True, if the user may add web page previews to their messages,
implies can_send_media_messages
:type can_add_web_page_previews: :obj:`typing.Union[base.Boolean, None]`
:return: Returns True on success.
:return: Returns True on success
:rtype: :obj:`base.Boolean`
"""
until_date = prepare_arg(until_date)
@ -1020,7 +1027,7 @@ class Bot(BaseBot):
with a subset of his own privileges or demote administrators that he has promoted,
directly or indirectly (promoted by administrators that were appointed by him)
:type can_promote_members: :obj:`typing.Union[base.Boolean, None]`
:return: Returns True on success.
:return: Returns True on success
:rtype: :obj:`base.Boolean`
"""
payload = generate_payload(**locals())
@ -1037,7 +1044,7 @@ class Bot(BaseBot):
:param chat_id: Unique identifier for the target chat or username of the target channel
:type chat_id: :obj:`typing.Union[base.Integer, base.String]`
:return: Returns exported invite link as String on success.
:return: Returns exported invite link as String on success
:rtype: :obj:`base.String`
"""
payload = generate_payload(**locals())
@ -1060,7 +1067,7 @@ class Bot(BaseBot):
:type chat_id: :obj:`typing.Union[base.Integer, base.String]`
:param photo: New chat photo, uploaded using multipart/form-data
:type photo: :obj:`base.InputFile`
:return: Returns True on success.
:return: Returns True on success
:rtype: :obj:`base.Boolean`
"""
payload = generate_payload(**locals(), exclude=['photo'])
@ -1080,7 +1087,7 @@ class Bot(BaseBot):
:param chat_id: Unique identifier for the target chat or username of the target channel
:type chat_id: :obj:`typing.Union[base.Integer, base.String]`
:return: Returns True on success.
:return: Returns True on success
:rtype: :obj:`base.Boolean`
"""
payload = generate_payload(**locals())
@ -1103,7 +1110,7 @@ class Bot(BaseBot):
:type chat_id: :obj:`typing.Union[base.Integer, base.String]`
:param title: New chat title, 1-255 characters
:type title: :obj:`base.String`
:return: Returns True on success.
:return: Returns True on success
:rtype: :obj:`base.Boolean`
"""
payload = generate_payload(**locals())
@ -1123,7 +1130,7 @@ class Bot(BaseBot):
:type chat_id: :obj:`typing.Union[base.Integer, base.String]`
:param description: New chat description, 0-255 characters
:type description: :obj:`typing.Union[base.String, None]`
:return: Returns True on success.
:return: Returns True on success
:rtype: :obj:`base.Boolean`
"""
payload = generate_payload(**locals())
@ -1146,7 +1153,7 @@ class Bot(BaseBot):
:param disable_notification: Pass True, if it is not necessary to send a notification to
all group members about the new pinned message
:type disable_notification: :obj:`typing.Union[base.Boolean, None]`
:return: Returns True on success.
:return: Returns True on success
:rtype: :obj:`base.Boolean`
"""
payload = generate_payload(**locals())
@ -1163,7 +1170,7 @@ class Bot(BaseBot):
:param chat_id: Unique identifier for the target chat or username of the target supergroup
:type chat_id: :obj:`typing.Union[base.Integer, base.String]`
:return: Returns True on success.
:return: Returns True on success
:rtype: :obj:`base.Boolean`
"""
payload = generate_payload(**locals())
@ -1179,7 +1186,7 @@ class Bot(BaseBot):
:param chat_id: Unique identifier for the target chat or username of the target supergroup or channel
:type chat_id: :obj:`typing.Union[base.Integer, base.String]`
:return: Returns True on success.
:return: Returns True on success
:rtype: :obj:`base.Boolean`
"""
payload = generate_payload(**locals())
@ -1196,7 +1203,7 @@ class Bot(BaseBot):
:param chat_id: Unique identifier for the target chat or username of the target supergroup or channel
:type chat_id: :obj:`typing.Union[base.Integer, base.String]`
:return: Returns a Chat object on success.
:return: Returns a Chat object on success
:rtype: :obj:`types.Chat`
"""
payload = generate_payload(**locals())
@ -1232,7 +1239,7 @@ class Bot(BaseBot):
:param chat_id: Unique identifier for the target chat or username of the target supergroup or channel
:type chat_id: :obj:`typing.Union[base.Integer, base.String]`
:return: Returns Int on success.
:return: Returns Int on success
:rtype: :obj:`base.Integer`
"""
payload = generate_payload(**locals())
@ -1251,7 +1258,7 @@ class Bot(BaseBot):
:type chat_id: :obj:`typing.Union[base.Integer, base.String]`
:param user_id: Unique identifier of the target user
:type user_id: :obj:`base.Integer`
:return: Returns a ChatMember object on success.
:return: Returns a ChatMember object on success
:rtype: :obj:`types.ChatMember`
"""
payload = generate_payload(**locals())
@ -1274,7 +1281,7 @@ class Bot(BaseBot):
:type chat_id: :obj:`typing.Union[base.Integer, base.String]`
:param sticker_set_name: Name of the sticker set to be set as the group sticker set
:type sticker_set_name: :obj:`base.String`
:return: Returns True on success.
:return: Returns True on success
:rtype: :obj:`base.Boolean`
"""
payload = generate_payload(**locals())
@ -1294,7 +1301,7 @@ class Bot(BaseBot):
:param chat_id: Unique identifier for the target chat or username of the target supergroup
:type chat_id: :obj:`typing.Union[base.Integer, base.String]`
:return: Returns True on success.
:return: Returns True on success
:rtype: :obj:`base.Boolean`
"""
payload = generate_payload(**locals())
@ -1324,12 +1331,12 @@ class Bot(BaseBot):
:param show_alert: If true, an alert will be shown by the client instead of a notification
at the top of the chat screen. Defaults to false.
:type show_alert: :obj:`typing.Union[base.Boolean, None]`
:param url: URL that will be opened by the user's client.
:param url: URL that will be opened by the user's client
:type url: :obj:`typing.Union[base.String, None]`
:param cache_time: The maximum amount of time in seconds that the
result of the callback query may be cached client-side.
:type cache_time: :obj:`typing.Union[base.Integer, None]`
:return: On success, True is returned.
:return: On success, True is returned
:rtype: :obj:`base.Boolean`
"""
payload = generate_payload(**locals())
@ -1350,7 +1357,7 @@ class Bot(BaseBot):
Source: https://core.telegram.org/bots/api#editmessagetext
:param chat_id: Required if inline_message_id is not specified.
:param chat_id: Required if inline_message_id is not specified
Unique identifier for the target chat or username of the target channel
:type chat_id: :obj:`typing.Union[base.Integer, base.String, None]`
:param message_id: Required if inline_message_id is not specified. Identifier of the sent message
@ -1364,7 +1371,7 @@ class Bot(BaseBot):
:type parse_mode: :obj:`typing.Union[base.String, None]`
:param disable_web_page_preview: Disables link previews for links in this message
:type disable_web_page_preview: :obj:`typing.Union[base.Boolean, None]`
:param reply_markup: A JSON-serialized object for an inline keyboard.
:param reply_markup: A JSON-serialized object for an inline keyboard
:type reply_markup: :obj:`typing.Union[types.InlineKeyboardMarkup, None]`
:return: On success, if edited message is sent by the bot,
the edited Message is returned, otherwise True is returned.
@ -1394,7 +1401,7 @@ class Bot(BaseBot):
Source: https://core.telegram.org/bots/api#editmessagecaption
:param chat_id: Required if inline_message_id is not specified.
:param chat_id: Required if inline_message_id is not specified
Unique identifier for the target chat or username of the target channel
:type chat_id: :obj:`typing.Union[base.Integer, base.String, None]`
:param message_id: Required if inline_message_id is not specified. Identifier of the sent message
@ -1406,7 +1413,7 @@ class Bot(BaseBot):
:param parse_mode: Send Markdown or HTML, if you want Telegram apps to show bold, italic,
fixed-width text or inline URLs in your bot's message.
:type parse_mode: :obj:`typing.Union[base.String, None]`
:param reply_markup: A JSON-serialized object for an inline keyboard.
:param reply_markup: A JSON-serialized object for an inline keyboard
:type reply_markup: :obj:`typing.Union[types.InlineKeyboardMarkup, None]`
:return: On success, if edited message is sent by the bot, the edited Message is returned,
otherwise True is returned.
@ -1443,7 +1450,7 @@ class Bot(BaseBot):
Source https://core.telegram.org/bots/api#editmessagemedia
:param chat_id: Required if inline_message_id is not specified.
:param chat_id: Required if inline_message_id is not specified
:type chat_id: :obj:`typing.Union[typing.Union[base.Integer, base.String], None]`
:param message_id: Required if inline_message_id is not specified. Identifier of the sent message
:type message_id: :obj:`typing.Union[base.Integer, None]`
@ -1451,9 +1458,10 @@ class Bot(BaseBot):
:type inline_message_id: :obj:`typing.Union[base.String, None]`
:param media: A JSON-serialized object for a new media content of the message
:type media: :obj:`types.InputMedia`
:param reply_markup: A JSON-serialized object for a new inline keyboard.
:param reply_markup: A JSON-serialized object for a new inline keyboard
:type reply_markup: :obj:`typing.Union[types.InlineKeyboardMarkup, None]`
:return: On success, if the edited message was sent by the bot, the edited Message is returned, otherwise True is returned.
:return: On success, if the edited message was sent by the bot, the edited Message is returned,
otherwise True is returned
:rtype: :obj:`typing.Union[types.Message, base.Boolean]`
"""
@ -1483,14 +1491,14 @@ class Bot(BaseBot):
Source: https://core.telegram.org/bots/api#editmessagereplymarkup
:param chat_id: Required if inline_message_id is not specified.
:param chat_id: Required if inline_message_id is not specified
Unique identifier for the target chat or username of the target channel
:type chat_id: :obj:`typing.Union[base.Integer, base.String, None]`
:param message_id: Required if inline_message_id is not specified. Identifier of the sent message
:type message_id: :obj:`typing.Union[base.Integer, None]`
:param inline_message_id: Required if chat_id and message_id are not specified. Identifier of the inline message
:type inline_message_id: :obj:`typing.Union[base.String, None]`
:param reply_markup: A JSON-serialized object for an inline keyboard.
:param reply_markup: A JSON-serialized object for an inline keyboard
:type reply_markup: :obj:`typing.Union[types.InlineKeyboardMarkup, None]`
:return: On success, if edited message is sent by the bot, the edited Message is returned,
otherwise True is returned.
@ -1523,7 +1531,7 @@ class Bot(BaseBot):
:type chat_id: :obj:`typing.Union[base.Integer, base.String]`
:param message_id: Identifier of the message to delete
:type message_id: :obj:`base.Integer`
:return: Returns True on success.
:return: Returns True on success
:rtype: :obj:`base.Boolean`
"""
payload = generate_payload(**locals())
@ -1549,16 +1557,16 @@ class Bot(BaseBot):
:param chat_id: Unique identifier for the target chat or username of the target channel
:type chat_id: :obj:`typing.Union[base.Integer, base.String]`
:param sticker: Sticker to send.
:param sticker: Sticker to send
:type sticker: :obj:`typing.Union[base.InputFile, base.String]`
:param disable_notification: Sends the message silently. Users will receive a notification with no sound.
:param disable_notification: Sends the message silently. Users will receive a notification with no sound
:type disable_notification: :obj:`typing.Union[base.Boolean, None]`
:param reply_to_message_id: If the message is a reply, ID of the original message
:type reply_to_message_id: :obj:`typing.Union[base.Integer, None]`
:param reply_markup: Additional interface options.
:param reply_markup: Additional interface options
:type reply_markup: :obj:`typing.Union[types.InlineKeyboardMarkup,
types.ReplyKeyboardMarkup, types.ReplyKeyboardRemove, types.ForceReply, None]`
:return: On success, the sent Message is returned.
:return: On success, the sent Message is returned
:rtype: :obj:`types.Message`
"""
reply_markup = prepare_arg(reply_markup)
@ -1575,7 +1583,7 @@ class Bot(BaseBot):
:param name: Name of the sticker set
:type name: :obj:`base.String`
:return: On success, a StickerSet object is returned.
:return: On success, a StickerSet object is returned
:rtype: :obj:`types.StickerSet`
"""
payload = generate_payload(**locals())
@ -1595,7 +1603,7 @@ class Bot(BaseBot):
:param png_sticker: Png image with the sticker, must be up to 512 kilobytes in size,
dimensions must not exceed 512px, and either width or height must be exactly 512px.
:type png_sticker: :obj:`base.InputFile`
:return: Returns the uploaded File on success.
:return: Returns the uploaded File on success
:rtype: :obj:`types.File`
"""
payload = generate_payload(**locals(), exclude=['png_sticker'])
@ -1614,7 +1622,7 @@ class Bot(BaseBot):
:param user_id: User identifier of created sticker set owner
:type user_id: :obj:`base.Integer`
:param name: Short name of sticker set, to be used in t.me/addstickers/ URLs (e.g., animals).
:param name: Short name of sticker set, to be used in t.me/addstickers/ URLs (e.g., animals)
:type name: :obj:`base.String`
:param title: Sticker set title, 1-64 characters
:type title: :obj:`base.String`
@ -1627,7 +1635,7 @@ class Bot(BaseBot):
:type contains_masks: :obj:`typing.Union[base.Boolean, None]`
:param mask_position: A JSON-serialized object for position where the mask should be placed on faces
:type mask_position: :obj:`typing.Union[types.MaskPosition, None]`
:return: Returns True on success.
:return: Returns True on success
:rtype: :obj:`base.Boolean`
"""
mask_position = prepare_arg(mask_position)
@ -1655,7 +1663,7 @@ class Bot(BaseBot):
:type emojis: :obj:`base.String`
:param mask_position: A JSON-serialized object for position where the mask should be placed on faces
:type mask_position: :obj:`typing.Union[types.MaskPosition, None]`
:return: Returns True on success.
:return: Returns True on success
:rtype: :obj:`base.Boolean`
"""
mask_position = prepare_arg(mask_position)
@ -1674,7 +1682,7 @@ class Bot(BaseBot):
:type sticker: :obj:`base.String`
:param position: New sticker position in the set, zero-based
:type position: :obj:`base.Integer`
:return: Returns True on success.
:return: Returns True on success
:rtype: :obj:`base.Boolean`
"""
payload = generate_payload(**locals())
@ -1692,7 +1700,7 @@ class Bot(BaseBot):
:param sticker: File identifier of the sticker
:type sticker: :obj:`base.String`
:return: Returns True on success.
:return: Returns True on success
:rtype: :obj:`base.Boolean`
"""
payload = generate_payload(**locals())
@ -1735,7 +1743,7 @@ class Bot(BaseBot):
:param switch_pm_parameter: Deep-linking parameter for the /start message sent to the bot when
user presses the switch button. 1-64 characters, only A-Z, a-z, 0-9, _ and - are allowed.
:type switch_pm_parameter: :obj:`typing.Union[base.String, None]`
:return: On success, True is returned.
:return: On success, True is returned
:rtype: :obj:`base.Boolean`
"""
results = prepare_arg(results)
@ -1775,7 +1783,7 @@ class Bot(BaseBot):
:type title: :obj:`base.String`
:param description: Product description, 1-255 characters
:type description: :obj:`base.String`
:param payload: Bot-defined invoice payload, 1-128 bytes.
:param payload: Bot-defined invoice payload, 1-128 bytes
This will not be displayed to the user, use for your internal processes.
:type payload: :obj:`base.String`
:param provider_token: Payments provider token, obtained via Botfather
@ -1788,9 +1796,9 @@ class Bot(BaseBot):
:param prices: Price breakdown, a list of components
(e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)
:type prices: :obj:`typing.List[types.LabeledPrice]`
:param provider_data: JSON-encoded data about the invoice, which will be shared with the payment provider.
:param provider_data: JSON-encoded data about the invoice, which will be shared with the payment provider
:type provider_data: :obj:`typing.Union[typing.Dict, None]`
:param photo_url: URL of the product photo for the invoice.
:param photo_url: URL of the product photo for the invoice
:type photo_url: :obj:`typing.Union[base.String, None]`
:param photo_size: Photo size
:type photo_size: :obj:`typing.Union[base.Integer, None]`
@ -1808,14 +1816,14 @@ class Bot(BaseBot):
:type need_shipping_address: :obj:`typing.Union[base.Boolean, None]`
:param is_flexible: Pass True, if the final price depends on the shipping method
:type is_flexible: :obj:`typing.Union[base.Boolean, None]`
:param disable_notification: Sends the message silently. Users will receive a notification with no sound.
:param disable_notification: Sends the message silently. Users will receive a notification with no sound
:type disable_notification: :obj:`typing.Union[base.Boolean, None]`
:param reply_to_message_id: If the message is a reply, ID of the original message
:type reply_to_message_id: :obj:`typing.Union[base.Integer, None]`
:param reply_markup: A JSON-serialized object for an inline keyboard.
:param reply_markup: A JSON-serialized object for an inline keyboard
If empty, one 'Pay total price' button will be shown. If not empty, the first button must be a Pay button.
:type reply_markup: :obj:`typing.Union[types.InlineKeyboardMarkup, None]`
:return: On success, the sent Message is returned.
:return: On success, the sent Message is returned
:rtype: :obj:`types.Message`
"""
prices = prepare_arg([price.to_python() if hasattr(price, 'to_python') else price for price in prices])
@ -1839,14 +1847,14 @@ class Bot(BaseBot):
:param ok: Specify True if delivery to the specified address is possible and False if there are any problems
(for example, if delivery to the specified address is not possible)
:type ok: :obj:`base.Boolean`
:param shipping_options: Required if ok is True. A JSON-serialized array of available shipping options.
:param shipping_options: Required if ok is True. A JSON-serialized array of available shipping options
:type shipping_options: :obj:`typing.Union[typing.List[types.ShippingOption], None]`
:param error_message: Required if ok is False.
:param error_message: Required if ok is False
Error message in human readable form that explains why it is impossible to complete the order
(e.g. "Sorry, delivery to your desired address is unavailable').
Telegram will display this message to the user.
:type error_message: :obj:`typing.Union[base.String, None]`
:return: On success, True is returned.
:return: On success, True is returned
:rtype: :obj:`base.Boolean`
"""
if shipping_options:
@ -1873,13 +1881,13 @@ class Bot(BaseBot):
:param ok: Specify True if everything is alright (goods are available, etc.) and the
bot is ready to proceed with the order. Use False if there are any problems.
:type ok: :obj:`base.Boolean`
:param error_message: Required if ok is False.
:param error_message: Required if ok is False
Error message in human readable form that explains the reason for failure to proceed with the checkout
(e.g. "Sorry, somebody just bought the last of our amazing black T-shirts while you were busy filling
out your payment details. Please choose a different color or garment!").
Telegram will display this message to the user.
:type error_message: :obj:`typing.Union[base.String, None]`
:return: On success, True is returned.
:return: On success, True is returned
:rtype: :obj:`base.Boolean`
"""
payload = generate_payload(**locals())
@ -1910,7 +1918,7 @@ class Bot(BaseBot):
:type user_id: :obj:`base.Integer`
:param errors: A JSON-serialized array describing the errors
:type errors: :obj:`typing.List[types.PassportElementError]`
:return: Returns True on success.
:return: Returns True on success
:rtype: :obj:`base.Boolean`
"""
errors = prepare_arg(errors)
@ -1936,14 +1944,14 @@ class Bot(BaseBot):
:param game_short_name: Short name of the game, serves as the unique identifier for the game. \
Set up your games via Botfather.
:type game_short_name: :obj:`base.String`
:param disable_notification: Sends the message silently. Users will receive a notification with no sound.
:param disable_notification: Sends the message silently. Users will receive a notification with no sound
:type disable_notification: :obj:`typing.Union[base.Boolean, None]`
:param reply_to_message_id: If the message is a reply, ID of the original message
:type reply_to_message_id: :obj:`typing.Union[base.Integer, None]`
:param reply_markup: A JSON-serialized object for an inline keyboard.
:param reply_markup: A JSON-serialized object for an inline keyboard
If empty, one Play game_title button will be shown. If not empty, the first button must launch the game.
:type reply_markup: :obj:`typing.Union[types.InlineKeyboardMarkup, None]`
:return: On success, the sent Message is returned.
:return: On success, the sent Message is returned
:rtype: :obj:`types.Message`
"""
reply_markup = prepare_arg(reply_markup)
@ -1968,7 +1976,7 @@ class Bot(BaseBot):
:type user_id: :obj:`base.Integer`
:param score: New score, must be non-negative
:type score: :obj:`base.Integer`
:param force: Pass True, if the high score is allowed to decrease.
:param force: Pass True, if the high score is allowed to decrease
This can be useful when fixing mistakes or banning cheaters
:type force: :obj:`typing.Union[base.Boolean, None]`
:param disable_edit_message: Pass True, if the game message should not be automatically
@ -1980,7 +1988,7 @@ class Bot(BaseBot):
:type message_id: :obj:`typing.Union[base.Integer, None]`
:param inline_message_id: Required if chat_id and message_id are not specified. Identifier of the inline message
:type inline_message_id: :obj:`typing.Union[base.String, None]`
:return: On success, if the message was sent by the bot, returns the edited Message, otherwise returns True.
:return: On success, if the message was sent by the bot, returns the edited Message, otherwise returns True
Returns an error, if the new score is not greater than the user's
current score in the chat and force is False.
:rtype: :obj:`typing.Union[types.Message, base.Boolean]`
@ -2015,7 +2023,7 @@ class Bot(BaseBot):
:type message_id: :obj:`typing.Union[base.Integer, None]`
:param inline_message_id: Required if chat_id and message_id are not specified. Identifier of the inline message
:type inline_message_id: :obj:`typing.Union[base.String, None]`
:return: Will return the score of the specified user and several of his neighbors in a game.
:return: Will return the score of the specified user and several of his neighbors in a game
On success, returns an Array of GameHighScore objects.
This method will currently return scores for the target user,
plus two of his closest neighbors on each side. Will also return the top three users if the

View file

@ -4,7 +4,7 @@ import weakref
import rethinkdb as r
from ...dispatcher import BaseStorage
from ...dispatcher.storage import BaseStorage
__all__ = ['RethinkDBStorage', 'ConnectionNotClosed']