mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-25 19:03:46 +03:00
Document new errors and limits for inline results
This commit is contained in:
parent
41bfb8ae52
commit
628a16f287
|
@ -145,6 +145,12 @@ class InlineQuery(EventBuilder):
|
|||
r2 = builder.article('Be bad', text="I don't like you")
|
||||
await inline.answer([r1, r2])
|
||||
|
||||
You can send up to 50 results as documented in
|
||||
https://core.telegram.org/bots/api#answerinlinequery.
|
||||
Sending more will raise ``ResultsTooMuchError``,
|
||||
and you should consider using `next_offset` to
|
||||
paginate them.
|
||||
|
||||
cache_time (`int`, optional):
|
||||
For how long this result should be cached on
|
||||
the user's client. Defaults to 0 for no cache.
|
||||
|
|
|
@ -43,8 +43,15 @@ class InlineBuilder:
|
|||
id (`str`, optional):
|
||||
The string ID to use for this result. If not present, it
|
||||
will be the SHA256 hexadecimal digest of converting the
|
||||
request with empty ID to ``bytes()``, so that the ID will
|
||||
be deterministic for the same input.
|
||||
created :tl:`InputBotInlineResult` with empty ID to ``bytes()``,
|
||||
so that the ID will be deterministic for the same input.
|
||||
|
||||
.. note::
|
||||
|
||||
If two inputs are exactly the same, their IDs will be the same
|
||||
too. If you send two articles with the same ID, it will raise
|
||||
``ResultIdDuplicateError``. Consider giving them an explicit
|
||||
ID if you need to send two results that are the same.
|
||||
"""
|
||||
def __init__(self, client):
|
||||
self._client = client
|
||||
|
|
|
@ -187,7 +187,9 @@ RANGES_INVALID,400,Invalid range provided
|
|||
REG_ID_GENERATE_FAILED,500,Failure while generating registration ID
|
||||
REPLY_MARKUP_INVALID,400,The provided reply markup is invalid
|
||||
REPLY_MARKUP_TOO_LONG,400,The data embedded in the reply markup buttons was too much
|
||||
RESULT_ID_DUPLICATE,400,Duplicated IDs on the sent results. Make sure to use unique IDs.
|
||||
RESULT_TYPE_INVALID,400,Result type invalid
|
||||
RESULTS_TOO_MUCH,400,You sent too many results. See https://core.telegram.org/bots/api#answerinlinequery for the current limit.
|
||||
RIGHT_FORBIDDEN,403,Your admin rights do not allow you to do this
|
||||
RPC_CALL_FAIL,,"Telegram is having internal issues, please try again later."
|
||||
RPC_MCGET_FAIL,,"Telegram is having internal issues, please try again later."
|
||||
|
|
|
Loading…
Reference in New Issue
Block a user