Skip to content

Commit 93dc1cd

Browse files
committed
Add comment.
1 parent a7469e6 commit 93dc1cd

2 files changed

Lines changed: 25 additions & 0 deletions

File tree

‎telebot/__init__.py‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,16 @@ def reply_to(self, message, text, **kwargs):
416416
return self.send_message(message.chat.id, text, reply_to_message_id=message.message_id, **kwargs)
417417

418418
def answer_inline_query(self, inline_query_id, results, cache_time=None, is_personal=None, next_offset=None):
419+
"""
420+
Use this method to send answers to an inline query. On success, True is returned.
421+
No more than 50 results per query are allowed.
422+
:param inline_query_id: Unique identifier for the answered query
423+
:param results: Array of results for the inline query
424+
:param cache_time: The maximum amount of time in seconds that the result of the inline query may be cached on the server.
425+
:param is_personal: Pass True, if results may be cached on the server side only for the user that sent the query.
426+
:param next_offset: Pass the offset that a client should send in the next query with the same text to receive more results.
427+
:return: True means success.
428+
"""
419429
return apihelper.answer_inline_query(self.token, inline_query_id, results, cache_time, is_personal, next_offset)
420430

421431
def register_for_reply(self, message, callback):

‎telebot/types.py‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -562,6 +562,21 @@ def __init__(self, result_id, from_user, query):
562562
class InlineQueryResultArticle(JsonSerializable):
563563
def __init__(self, id, title, message_text, parse_mode=None, disable_web_page_preview=None, url=None,
564564
hide_url=None, description=None, thumb_url=None, thumb_width=None, thumb_height=None):
565+
"""
566+
Represents a link to an article or web page.
567+
:param id: Unique identifier for this result, 1-64 Bytes.
568+
:param title: Title of the result.
569+
:param message_text: Text of the message to be sent.
570+
:param parse_mode: Send “Markdown”, if you want Telegram apps to show bold, italic and inline URLs in your bot's message.
571+
:param disable_web_page_preview: Disables link previews for links in the sent message.
572+
:param url: URL of the result.
573+
:param hide_url: Pass True, if you don't want the URL to be shown in the message.
574+
:param description: Short description of the result.
575+
:param thumb_url: Url of the thumbnail for the result.
576+
:param thumb_width: Thumbnail width.
577+
:param thumb_height: Thumbnail height
578+
:return:
579+
"""
565580
self.type = 'article'
566581
self.id = id
567582
self.title = title

0 commit comments

Comments
 (0)