mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-05 04:30:22 +03:00
remove url and cache_time from ButtonCallback.answer
remove url and cache_time from ButtonCallback.answer
This commit is contained in:
parent
f2460fa6ba
commit
443bd529e6
|
@ -45,8 +45,6 @@ class ButtonCallback(Event):
|
||||||
self,
|
self,
|
||||||
text: Optional[str] = None,
|
text: Optional[str] = None,
|
||||||
alert: bool = False,
|
alert: bool = False,
|
||||||
url: Optional[str] = None,
|
|
||||||
cache_time: int = 0,
|
|
||||||
) -> None:
|
) -> None:
|
||||||
"""
|
"""
|
||||||
Answer the callback query.
|
Answer the callback query.
|
||||||
|
@ -59,21 +57,14 @@ class ButtonCallback(Event):
|
||||||
The text of the message to display to the user, usually as a toast.
|
The text of the message to display to the user, usually as a toast.
|
||||||
:param alert:
|
:param alert:
|
||||||
If True, the answer will be shown as a pop-up alert that must be dismissed by the user.
|
If True, the answer will be shown as a pop-up alert that must be dismissed by the user.
|
||||||
:param url:
|
|
||||||
Url, to which user will be redirected upon pressing the button.
|
|
||||||
It should be a link to the same bot with ?start=... parameter, or a link to the game.
|
|
||||||
:param cache_time:
|
|
||||||
Time in seconds to cache the answer on the client side,
|
|
||||||
preventing repeated callback queries from being sent to the bot on subsequent button presses.
|
|
||||||
A cache_time of 0 means each button press will send a callback query to the bot.
|
|
||||||
"""
|
"""
|
||||||
await self._client(
|
await self._client(
|
||||||
functions.messages.set_bot_callback_answer(
|
functions.messages.set_bot_callback_answer(
|
||||||
alert=alert,
|
alert=alert,
|
||||||
query_id=self._raw.query_id,
|
query_id=self._raw.query_id,
|
||||||
message=text,
|
message=text,
|
||||||
url=url,
|
url=None,
|
||||||
cache_time=cache_time,
|
cache_time=0,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user