Update documentation

This commit is contained in:
Lonami
2025-11-05 20:14:25 +01:00
committed by Lonami Exo
commit 9a95659d62
2930 changed files with 60617 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>AddPreviewMediaRequest</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link id="style" href="../../css/docs.dark.css" rel="stylesheet">
<script>
document.getElementById("style").href = "../../css/docs."
+ (localStorage.getItem("theme") || "light")
+ ".css";
</script>
<link href="https://fonts.googleapis.com/css?family=Nunito|Source+Code+Pro"
rel="stylesheet">
</head>
<body>
<div id="main_div"><ul class="horizontal"><li><a href="../../index.html">API</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="../index.html">Methods</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="index.html">Bots</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="add_preview_media.html">AddPreviewMediaRequest</a></li></ul><h1>AddPreviewMediaRequest</h1><p>Both users and bots <strong>may</strong> be able to use this request. <a href="#examples">See code examples.</a></p><pre>---functions---
bots.addPreviewMedia#17aeb75a bot:<a href="../../types/input_user.html">InputUser</a> lang_code:<a href="../../index.html#string">string</a> media:<a href="../../types/input_media.html">InputMedia</a> = <a href="../../types/bot_preview_media.html">BotPreviewMedia</a></pre><button onclick="cp('from telethon.tl.functions.bots import AddPreviewMediaRequest');">Copy import to the clipboard</button><h3>Returns</h3><table><tr><td><a href="../../types/bot_preview_media.html">BotPreviewMedia</a></td></tr></table><p>This type can only be an instance of:</p><table><tr><td><a href="../../constructors/bot_preview_media.html">BotPreviewMedia</a></td></tr></table><h3>Parameters</h3><table><tr><td><b>bot</b></td><td style="text-align:center"><a href="../../types/input_user.html">InputUser</a></td><td>Anything entity-like will work if the library can find its <code>Input</code> version (e.g., usernames, <code>Peer</code>, <code>User</code> or <code>Channel</code> objects, etc.).</td></tr><tr><td><b>lang_code</b></td><td style="text-align:center"><a href="../../index.html#string">string</a></td><td></td></tr><tr><td><b>media</b></td><td style="text-align:center"><a href="../../types/input_media.html">InputMedia</a></td><td></td></tr></table><h1>Known RPC errors</h1><p>This request can't cause any RPC error as far as we know.</p><h1 id="examples">Example</h1><pre><strong>from</strong> telethon.sync <strong>import</strong> TelegramClient
<strong>from</strong> telethon <strong>import</strong> functions, types
<strong>with</strong> TelegramClient(name, api_id, api_hash) <strong>as</strong> client:
result = client(functions.bots.AddPreviewMediaRequest(
bot=<em>'username'</em>,
lang_code=<em>'en'</em>,
media=types.InputMediaUploadedPhoto(
file=client.upload_file(<em>'/path/to/file.jpg'</em>),
spoiler=<strong>True</strong>,
stickers=[types.InputDocument(
id=-12398745604826,
access_hash=-12398745604826,
file_reference=<em>b'arbitrary\x7f data \xfa here'</em>
)],
ttl_seconds=42
)
))
print(result.stringify())</pre><textarea id="c" class="invisible"></textarea><script>function cp(t){var c=document.getElementById("c");c.value=t;c.select();try{document.execCommand("copy")}catch(e){}}</script></div><script>prependPath = "../../";</script><script src="../../js/search.js"></script></body></html>
+25
View File
@@ -0,0 +1,25 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>AllowSendMessageRequest</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link id="style" href="../../css/docs.dark.css" rel="stylesheet">
<script>
document.getElementById("style").href = "../../css/docs."
+ (localStorage.getItem("theme") || "light")
+ ".css";
</script>
<link href="https://fonts.googleapis.com/css?family=Nunito|Source+Code+Pro"
rel="stylesheet">
</head>
<body>
<div id="main_div"><ul class="horizontal"><li><a href="../../index.html">API</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="../index.html">Methods</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="index.html">Bots</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="allow_send_message.html">AllowSendMessageRequest</a></li></ul><h1>AllowSendMessageRequest</h1><p>Both users and bots <strong>may</strong> be able to use this request. <a href="#examples">See code examples.</a></p><pre>---functions---
bots.allowSendMessage#f132e3ef bot:<a href="../../types/input_user.html">InputUser</a> = <a href="../../types/updates.html">Updates</a></pre><button onclick="cp('from telethon.tl.functions.bots import AllowSendMessageRequest');">Copy import to the clipboard</button><h3>Returns</h3><table><tr><td><a href="../../types/updates.html">Updates</a></td></tr></table><p>This type can be an instance of either:</p><table><tr><td><a href="../../constructors/update_short.html">UpdateShort</a></td><td><a href="../../constructors/update_short_chat_message.html">UpdateShortChatMessage</a></td></tr><tr><td><a href="../../constructors/update_short_message.html">UpdateShortMessage</a></td><td><a href="../../constructors/update_short_sent_message.html">UpdateShortSentMessage</a></td></tr><tr><td><a href="../../constructors/updates.html">Updates</a></td><td><a href="../../constructors/updates_combined.html">UpdatesCombined</a></td></tr><tr><td><a href="../../constructors/updates_too_long.html">UpdatesTooLong</a></td></tr></table><h3>Parameters</h3><table><tr><td><b>bot</b></td><td style="text-align:center"><a href="../../types/input_user.html">InputUser</a></td><td>Anything entity-like will work if the library can find its <code>Input</code> version (e.g., usernames, <code>Peer</code>, <code>User</code> or <code>Channel</code> objects, etc.).</td></tr></table><h1>Known RPC errors</h1><p>This request can't cause any RPC error as far as we know.</p><h1 id="examples">Example</h1><pre><strong>from</strong> telethon.sync <strong>import</strong> TelegramClient
<strong>from</strong> telethon <strong>import</strong> functions, types
<strong>with</strong> TelegramClient(name, api_id, api_hash) <strong>as</strong> client:
result = client(functions.bots.AllowSendMessageRequest(
bot=<em>'username'</em>
))
print(result.stringify())</pre><textarea id="c" class="invisible"></textarea><script>function cp(t){var c=document.getElementById("c");c.value=t;c.select();try{document.execCommand("copy")}catch(e){}}</script></div><script>prependPath = "../../";</script><script src="../../js/search.js"></script></body></html>
@@ -0,0 +1,28 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>AnswerWebhookJSONQueryRequest</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link id="style" href="../../css/docs.dark.css" rel="stylesheet">
<script>
document.getElementById("style").href = "../../css/docs."
+ (localStorage.getItem("theme") || "light")
+ ".css";
</script>
<link href="https://fonts.googleapis.com/css?family=Nunito|Source+Code+Pro"
rel="stylesheet">
</head>
<body>
<div id="main_div"><ul class="horizontal"><li><a href="../../index.html">API</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="../index.html">Methods</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="index.html">Bots</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="answer_webhook_json_query.html">AnswerWebhookJSONQueryRequest</a></li></ul><h1>AnswerWebhookJSONQueryRequest</h1><p><strong>Only bots</strong> can use this request. <a href="#examples">See code examples.</a></p><pre>---functions---
bots.answerWebhookJSONQuery#e6213f4d query_id:<a href="../../index.html#long">long</a> data:<a href="../../types/data_json.html">DataJSON</a> = <a href="../../index.html#bool">Bool</a></pre><button onclick="cp('from telethon.tl.functions.bots import AnswerWebhookJSONQueryRequest');">Copy import to the clipboard</button><h3>Returns</h3><table><tr><td><a href="../../index.html#bool">Bool</a></td></tr></table><p>This type has no instances available.</p><table></table><h3>Parameters</h3><table><tr><td><b>query_id</b></td><td style="text-align:center"><a href="../../index.html#long">long</a></td><td></td></tr><tr><td><b>data</b></td><td style="text-align:center"><a href="../../types/data_json.html">DataJSON</a></td><td></td></tr></table><h1>Known RPC errors</h1><p>This request can cause 2 known errors:</p><table><tr><td><code>QueryIdInvalidError</code></td><td>The query ID is invalid.</td></tr><tr><td><code>UserBotInvalidError</code></td><td>This method can only be called by a bot.</td></tr></table><p>You can import these from <code>telethon.errors</code>.</p><h1 id="examples">Example</h1><pre><strong>from</strong> telethon.sync <strong>import</strong> TelegramClient
<strong>from</strong> telethon <strong>import</strong> functions, types
<strong>with</strong> TelegramClient(name, api_id, api_hash) <strong>as</strong> client:
result = client(functions.bots.AnswerWebhookJSONQueryRequest(
query_id=-12398745604826,
data=types.DataJSON(
data=<em>'some string here'</em>
)
))
print(result)</pre><textarea id="c" class="invisible"></textarea><script>function cp(t){var c=document.getElementById("c");c.value=t;c.select();try{document.execCommand("copy")}catch(e){}}</script></div><script>prependPath = "../../";</script><script src="../../js/search.js"></script></body></html>
+25
View File
@@ -0,0 +1,25 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>CanSendMessageRequest</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link id="style" href="../../css/docs.dark.css" rel="stylesheet">
<script>
document.getElementById("style").href = "../../css/docs."
+ (localStorage.getItem("theme") || "light")
+ ".css";
</script>
<link href="https://fonts.googleapis.com/css?family=Nunito|Source+Code+Pro"
rel="stylesheet">
</head>
<body>
<div id="main_div"><ul class="horizontal"><li><a href="../../index.html">API</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="../index.html">Methods</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="index.html">Bots</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="can_send_message.html">CanSendMessageRequest</a></li></ul><h1>CanSendMessageRequest</h1><p>Both users and bots <strong>may</strong> be able to use this request. <a href="#examples">See code examples.</a></p><pre>---functions---
bots.canSendMessage#1359f4e6 bot:<a href="../../types/input_user.html">InputUser</a> = <a href="../../index.html#bool">Bool</a></pre><button onclick="cp('from telethon.tl.functions.bots import CanSendMessageRequest');">Copy import to the clipboard</button><h3>Returns</h3><table><tr><td><a href="../../index.html#bool">Bool</a></td></tr></table><p>This type has no instances available.</p><table></table><h3>Parameters</h3><table><tr><td><b>bot</b></td><td style="text-align:center"><a href="../../types/input_user.html">InputUser</a></td><td>Anything entity-like will work if the library can find its <code>Input</code> version (e.g., usernames, <code>Peer</code>, <code>User</code> or <code>Channel</code> objects, etc.).</td></tr></table><h1>Known RPC errors</h1><p>This request can't cause any RPC error as far as we know.</p><h1 id="examples">Example</h1><pre><strong>from</strong> telethon.sync <strong>import</strong> TelegramClient
<strong>from</strong> telethon <strong>import</strong> functions, types
<strong>with</strong> TelegramClient(name, api_id, api_hash) <strong>as</strong> client:
result = client(functions.bots.CanSendMessageRequest(
bot=<em>'username'</em>
))
print(result)</pre><textarea id="c" class="invisible"></textarea><script>function cp(t){var c=document.getElementById("c");c.value=t;c.select();try{document.execCommand("copy")}catch(e){}}</script></div><script>prependPath = "../../";</script><script src="../../js/search.js"></script></body></html>
@@ -0,0 +1,27 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>CheckDownloadFileParamsRequest</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link id="style" href="../../css/docs.dark.css" rel="stylesheet">
<script>
document.getElementById("style").href = "../../css/docs."
+ (localStorage.getItem("theme") || "light")
+ ".css";
</script>
<link href="https://fonts.googleapis.com/css?family=Nunito|Source+Code+Pro"
rel="stylesheet">
</head>
<body>
<div id="main_div"><ul class="horizontal"><li><a href="../../index.html">API</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="../index.html">Methods</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="index.html">Bots</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="check_download_file_params.html">CheckDownloadFileParamsRequest</a></li></ul><h1>CheckDownloadFileParamsRequest</h1><p>Both users and bots <strong>may</strong> be able to use this request. <a href="#examples">See code examples.</a></p><pre>---functions---
bots.checkDownloadFileParams#50077589 bot:<a href="../../types/input_user.html">InputUser</a> file_name:<a href="../../index.html#string">string</a> url:<a href="../../index.html#string">string</a> = <a href="../../index.html#bool">Bool</a></pre><button onclick="cp('from telethon.tl.functions.bots import CheckDownloadFileParamsRequest');">Copy import to the clipboard</button><h3>Returns</h3><table><tr><td><a href="../../index.html#bool">Bool</a></td></tr></table><p>This type has no instances available.</p><table></table><h3>Parameters</h3><table><tr><td><b>bot</b></td><td style="text-align:center"><a href="../../types/input_user.html">InputUser</a></td><td>Anything entity-like will work if the library can find its <code>Input</code> version (e.g., usernames, <code>Peer</code>, <code>User</code> or <code>Channel</code> objects, etc.).</td></tr><tr><td><b>file_name</b></td><td style="text-align:center"><a href="../../index.html#string">string</a></td><td></td></tr><tr><td><b>url</b></td><td style="text-align:center"><a href="../../index.html#string">string</a></td><td></td></tr></table><h1>Known RPC errors</h1><p>This request can't cause any RPC error as far as we know.</p><h1 id="examples">Example</h1><pre><strong>from</strong> telethon.sync <strong>import</strong> TelegramClient
<strong>from</strong> telethon <strong>import</strong> functions, types
<strong>with</strong> TelegramClient(name, api_id, api_hash) <strong>as</strong> client:
result = client(functions.bots.CheckDownloadFileParamsRequest(
bot=<em>'username'</em>,
file_name=<em>'some string here'</em>,
url=<em>'some string here'</em>
))
print(result)</pre><textarea id="c" class="invisible"></textarea><script>function cp(t){var c=document.getElementById("c");c.value=t;c.select();try{document.execCommand("copy")}catch(e){}}</script></div><script>prependPath = "../../";</script><script src="../../js/search.js"></script></body></html>
+36
View File
@@ -0,0 +1,36 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>DeletePreviewMediaRequest</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link id="style" href="../../css/docs.dark.css" rel="stylesheet">
<script>
document.getElementById("style").href = "../../css/docs."
+ (localStorage.getItem("theme") || "light")
+ ".css";
</script>
<link href="https://fonts.googleapis.com/css?family=Nunito|Source+Code+Pro"
rel="stylesheet">
</head>
<body>
<div id="main_div"><ul class="horizontal"><li><a href="../../index.html">API</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="../index.html">Methods</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="index.html">Bots</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="delete_preview_media.html">DeletePreviewMediaRequest</a></li></ul><h1>DeletePreviewMediaRequest</h1><p>Both users and bots <strong>may</strong> be able to use this request. <a href="#examples">See code examples.</a></p><pre>---functions---
bots.deletePreviewMedia#2d0135b3 bot:<a href="../../types/input_user.html">InputUser</a> lang_code:<a href="../../index.html#string">string</a> media:<a href="../../index.html#vector">Vector</a>&lt;<a href="../../types/input_media.html">InputMedia</a>&gt; = <a href="../../index.html#bool">Bool</a></pre><button onclick="cp('from telethon.tl.functions.bots import DeletePreviewMediaRequest');">Copy import to the clipboard</button><h3>Returns</h3><table><tr><td><a href="../../index.html#bool">Bool</a></td></tr></table><p>This type has no instances available.</p><table></table><h3>Parameters</h3><table><tr><td><b>bot</b></td><td style="text-align:center"><a href="../../types/input_user.html">InputUser</a></td><td>Anything entity-like will work if the library can find its <code>Input</code> version (e.g., usernames, <code>Peer</code>, <code>User</code> or <code>Channel</code> objects, etc.).</td></tr><tr><td><b>lang_code</b></td><td style="text-align:center"><a href="../../index.html#string">string</a></td><td></td></tr><tr><td><b>media</b></td><td style="text-align:center"><a href="../../types/input_media.html">InputMedia</a></td><td>A <span class="tooltip" title="Any iterable that supports len() will work too">list</span> must be supplied.</td></tr></table><h1>Known RPC errors</h1><p>This request can't cause any RPC error as far as we know.</p><h1 id="examples">Example</h1><pre><strong>from</strong> telethon.sync <strong>import</strong> TelegramClient
<strong>from</strong> telethon <strong>import</strong> functions, types
<strong>with</strong> TelegramClient(name, api_id, api_hash) <strong>as</strong> client:
result = client(functions.bots.DeletePreviewMediaRequest(
bot=<em>'username'</em>,
lang_code=<em>'en'</em>,
media=[types.InputMediaUploadedPhoto(
file=client.upload_file(<em>'/path/to/file.jpg'</em>),
spoiler=<strong>True</strong>,
stickers=[types.InputDocument(
id=-12398745604826,
access_hash=-12398745604826,
file_reference=<em>b'arbitrary\x7f data \xfa here'</em>
)],
ttl_seconds=42
)]
))
print(result)</pre><textarea id="c" class="invisible"></textarea><script>function cp(t){var c=document.getElementById("c");c.value=t;c.select();try{document.execCommand("copy")}catch(e){}}</script></div><script>prependPath = "../../";</script><script src="../../js/search.js"></script></body></html>
+46
View File
@@ -0,0 +1,46 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>EditPreviewMediaRequest</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link id="style" href="../../css/docs.dark.css" rel="stylesheet">
<script>
document.getElementById("style").href = "../../css/docs."
+ (localStorage.getItem("theme") || "light")
+ ".css";
</script>
<link href="https://fonts.googleapis.com/css?family=Nunito|Source+Code+Pro"
rel="stylesheet">
</head>
<body>
<div id="main_div"><ul class="horizontal"><li><a href="../../index.html">API</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="../index.html">Methods</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="index.html">Bots</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="edit_preview_media.html">EditPreviewMediaRequest</a></li></ul><h1>EditPreviewMediaRequest</h1><p>Both users and bots <strong>may</strong> be able to use this request. <a href="#examples">See code examples.</a></p><pre>---functions---
bots.editPreviewMedia#8525606f bot:<a href="../../types/input_user.html">InputUser</a> lang_code:<a href="../../index.html#string">string</a> media:<a href="../../types/input_media.html">InputMedia</a> new_media:<a href="../../types/input_media.html">InputMedia</a> = <a href="../../types/bot_preview_media.html">BotPreviewMedia</a></pre><button onclick="cp('from telethon.tl.functions.bots import EditPreviewMediaRequest');">Copy import to the clipboard</button><h3>Returns</h3><table><tr><td><a href="../../types/bot_preview_media.html">BotPreviewMedia</a></td></tr></table><p>This type can only be an instance of:</p><table><tr><td><a href="../../constructors/bot_preview_media.html">BotPreviewMedia</a></td></tr></table><h3>Parameters</h3><table><tr><td><b>bot</b></td><td style="text-align:center"><a href="../../types/input_user.html">InputUser</a></td><td>Anything entity-like will work if the library can find its <code>Input</code> version (e.g., usernames, <code>Peer</code>, <code>User</code> or <code>Channel</code> objects, etc.).</td></tr><tr><td><b>lang_code</b></td><td style="text-align:center"><a href="../../index.html#string">string</a></td><td></td></tr><tr><td><b>media</b></td><td style="text-align:center"><a href="../../types/input_media.html">InputMedia</a></td><td></td></tr><tr><td><b>new_media</b></td><td style="text-align:center"><a href="../../types/input_media.html">InputMedia</a></td><td></td></tr></table><h1>Known RPC errors</h1><p>This request can't cause any RPC error as far as we know.</p><h1 id="examples">Example</h1><pre><strong>from</strong> telethon.sync <strong>import</strong> TelegramClient
<strong>from</strong> telethon <strong>import</strong> functions, types
<strong>with</strong> TelegramClient(name, api_id, api_hash) <strong>as</strong> client:
result = client(functions.bots.EditPreviewMediaRequest(
bot=<em>'username'</em>,
lang_code=<em>'en'</em>,
media=types.InputMediaUploadedPhoto(
file=client.upload_file(<em>'/path/to/file.jpg'</em>),
spoiler=<strong>True</strong>,
stickers=[types.InputDocument(
id=-12398745604826,
access_hash=-12398745604826,
file_reference=<em>b'arbitrary\x7f data \xfa here'</em>
)],
ttl_seconds=42
),
new_media=types.InputMediaUploadedPhoto(
file=client.upload_file(<em>'/path/to/file.jpg'</em>),
spoiler=<strong>True</strong>,
stickers=[types.InputDocument(
id=-12398745604826,
access_hash=-12398745604826,
file_reference=<em>b'arbitrary\x7f data \xfa here'</em>
)],
ttl_seconds=42
)
))
print(result.stringify())</pre><textarea id="c" class="invisible"></textarea><script>function cp(t){var c=document.getElementById("c");c.value=t;c.select();try{document.execCommand("copy")}catch(e){}}</script></div><script>prependPath = "../../";</script><script src="../../js/search.js"></script></body></html>
+24
View File
@@ -0,0 +1,24 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GetAdminedBotsRequest</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link id="style" href="../../css/docs.dark.css" rel="stylesheet">
<script>
document.getElementById("style").href = "../../css/docs."
+ (localStorage.getItem("theme") || "light")
+ ".css";
</script>
<link href="https://fonts.googleapis.com/css?family=Nunito|Source+Code+Pro"
rel="stylesheet">
</head>
<body>
<div id="main_div"><ul class="horizontal"><li><a href="../../index.html">API</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="../index.html">Methods</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="index.html">Bots</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="get_admined_bots.html">GetAdminedBotsRequest</a></li></ul><h1>GetAdminedBotsRequest</h1><p>Both users and bots <strong>may</strong> be able to use this request. <a href="#examples">See code examples.</a></p><pre>---functions---
bots.getAdminedBots#b0711d83 = <a href="../../index.html#vector">Vector</a>&lt;<a href="../../types/user.html">User</a>&gt;</pre><button onclick="cp('from telethon.tl.functions.bots import GetAdminedBotsRequest');">Copy import to the clipboard</button><h3>Returns</h3><p>A list of the following type is returned.</p><table><tr><td><a href="../../types/user.html">User</a></td></tr></table><p>This type can be an instance of either:</p><table><tr><td><a href="../../constructors/user.html">User</a></td><td><a href="../../constructors/user_empty.html">UserEmpty</a></td></tr></table><h3>Parameters</h3><p>This request takes no input parameters.</p><h1>Known RPC errors</h1><p>This request can't cause any RPC error as far as we know.</p><h1 id="examples">Example</h1><pre><strong>from</strong> telethon.sync <strong>import</strong> TelegramClient
<strong>from</strong> telethon <strong>import</strong> functions, types
<strong>with</strong> TelegramClient(name, api_id, api_hash) <strong>as</strong> client:
result = client(functions.bots.GetAdminedBotsRequest())
<strong>for</strong> x <strong>in</strong> result:
print(x)</pre><textarea id="c" class="invisible"></textarea><script>function cp(t){var c=document.getElementById("c");c.value=t;c.select();try{document.execCommand("copy")}catch(e){}}</script></div><script>prependPath = "../../";</script><script src="../../js/search.js"></script></body></html>
+27
View File
@@ -0,0 +1,27 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GetBotCommandsRequest</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link id="style" href="../../css/docs.dark.css" rel="stylesheet">
<script>
document.getElementById("style").href = "../../css/docs."
+ (localStorage.getItem("theme") || "light")
+ ".css";
</script>
<link href="https://fonts.googleapis.com/css?family=Nunito|Source+Code+Pro"
rel="stylesheet">
</head>
<body>
<div id="main_div"><ul class="horizontal"><li><a href="../../index.html">API</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="../index.html">Methods</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="index.html">Bots</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="get_bot_commands.html">GetBotCommandsRequest</a></li></ul><h1>GetBotCommandsRequest</h1><p>Both users and bots <strong>may</strong> be able to use this request. <a href="#examples">See code examples.</a></p><pre>---functions---
bots.getBotCommands#e34c0dd6 scope:<a href="../../types/bot_command_scope.html">BotCommandScope</a> lang_code:<a href="../../index.html#string">string</a> = <a href="../../index.html#vector">Vector</a>&lt;<a href="../../types/bot_command.html">BotCommand</a>&gt;</pre><button onclick="cp('from telethon.tl.functions.bots import GetBotCommandsRequest');">Copy import to the clipboard</button><h3>Returns</h3><p>A list of the following type is returned.</p><table><tr><td><a href="../../types/bot_command.html">BotCommand</a></td></tr></table><p>This type can only be an instance of:</p><table><tr><td><a href="../../constructors/bot_command.html">BotCommand</a></td></tr></table><h3>Parameters</h3><table><tr><td><b>scope</b></td><td style="text-align:center"><a href="../../types/bot_command_scope.html">BotCommandScope</a></td><td></td></tr><tr><td><b>lang_code</b></td><td style="text-align:center"><a href="../../index.html#string">string</a></td><td></td></tr></table><h1>Known RPC errors</h1><p>This request can't cause any RPC error as far as we know.</p><h1 id="examples">Example</h1><pre><strong>from</strong> telethon.sync <strong>import</strong> TelegramClient
<strong>from</strong> telethon <strong>import</strong> functions, types
<strong>with</strong> TelegramClient(name, api_id, api_hash) <strong>as</strong> client:
result = client(functions.bots.GetBotCommandsRequest(
scope=types.BotCommandScopeDefault(),
lang_code=<em>'en'</em>
))
<strong>for</strong> x <strong>in</strong> result:
print(x)</pre><textarea id="c" class="invisible"></textarea><script>function cp(t){var c=document.getElementById("c");c.value=t;c.select();try{document.execCommand("copy")}catch(e){}}</script></div><script>prependPath = "../../";</script><script src="../../js/search.js"></script></body></html>
+26
View File
@@ -0,0 +1,26 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GetBotInfoRequest</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link id="style" href="../../css/docs.dark.css" rel="stylesheet">
<script>
document.getElementById("style").href = "../../css/docs."
+ (localStorage.getItem("theme") || "light")
+ ".css";
</script>
<link href="https://fonts.googleapis.com/css?family=Nunito|Source+Code+Pro"
rel="stylesheet">
</head>
<body>
<div id="main_div"><ul class="horizontal"><li><a href="../../index.html">API</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="../index.html">Methods</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="index.html">Bots</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="get_bot_info.html">GetBotInfoRequest</a></li></ul><h1>GetBotInfoRequest</h1><p>Both users and bots <strong>may</strong> be able to use this request. <a href="#examples">See code examples.</a></p><pre>---functions---
bots.getBotInfo#dcd914fd flags:# bot:flags.0?<a href="../../types/input_user.html">InputUser</a> lang_code:<a href="../../index.html#string">string</a> = <a href="../../types/bots/bot_info.html">bots.BotInfo</a></pre><button onclick="cp('from telethon.tl.functions.bots import GetBotInfoRequest');">Copy import to the clipboard</button><h3>Returns</h3><table><tr><td><a href="../../types/bots/bot_info.html">bots.BotInfo</a></td></tr></table><p>This type can only be an instance of:</p><table><tr><td><a href="../../constructors/bots/bot_info.html">BotInfo</a></td></tr></table><h3>Parameters</h3><table><tr><td><b>lang_code</b></td><td style="text-align:center"><a href="../../index.html#string">string</a></td><td></td></tr><tr><td><b>bot</b></td><td style="text-align:center"><a href="../../types/input_user.html">InputUser</a></td><td>This argument defaults to <code>None</code> and can be omitted. Anything entity-like will work if the library can find its <code>Input</code> version (e.g., usernames, <code>Peer</code>, <code>User</code> or <code>Channel</code> objects, etc.).</td></tr></table><h1>Known RPC errors</h1><p>This request can't cause any RPC error as far as we know.</p><h1 id="examples">Example</h1><pre><strong>from</strong> telethon.sync <strong>import</strong> TelegramClient
<strong>from</strong> telethon <strong>import</strong> functions, types
<strong>with</strong> TelegramClient(name, api_id, api_hash) <strong>as</strong> client:
result = client(functions.bots.GetBotInfoRequest(
lang_code=<em>'en'</em>,
bot=<em>'username'</em>
))
print(result.stringify())</pre><textarea id="c" class="invisible"></textarea><script>function cp(t){var c=document.getElementById("c");c.value=t;c.select();try{document.execCommand("copy")}catch(e){}}</script></div><script>prependPath = "../../";</script><script src="../../js/search.js"></script></body></html>
+25
View File
@@ -0,0 +1,25 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GetBotMenuButtonRequest</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link id="style" href="../../css/docs.dark.css" rel="stylesheet">
<script>
document.getElementById("style").href = "../../css/docs."
+ (localStorage.getItem("theme") || "light")
+ ".css";
</script>
<link href="https://fonts.googleapis.com/css?family=Nunito|Source+Code+Pro"
rel="stylesheet">
</head>
<body>
<div id="main_div"><ul class="horizontal"><li><a href="../../index.html">API</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="../index.html">Methods</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="index.html">Bots</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="get_bot_menu_button.html">GetBotMenuButtonRequest</a></li></ul><h1>GetBotMenuButtonRequest</h1><p>Both users and bots <strong>may</strong> be able to use this request. <a href="#examples">See code examples.</a></p><pre>---functions---
bots.getBotMenuButton#9c60eb28 user_id:<a href="../../types/input_user.html">InputUser</a> = <a href="../../types/bot_menu_button.html">BotMenuButton</a></pre><button onclick="cp('from telethon.tl.functions.bots import GetBotMenuButtonRequest');">Copy import to the clipboard</button><h3>Returns</h3><table><tr><td><a href="../../types/bot_menu_button.html">BotMenuButton</a></td></tr></table><p>This type can be an instance of either:</p><table><tr><td><a href="../../constructors/bot_menu_button.html">BotMenuButton</a></td><td><a href="../../constructors/bot_menu_button_commands.html">BotMenuButtonCommands</a></td></tr><tr><td><a href="../../constructors/bot_menu_button_default.html">BotMenuButtonDefault</a></td></tr></table><h3>Parameters</h3><table><tr><td><b>user_id</b></td><td style="text-align:center"><a href="../../types/input_user.html">InputUser</a></td><td>Anything entity-like will work if the library can find its <code>Input</code> version (e.g., usernames, <code>Peer</code>, <code>User</code> or <code>Channel</code> objects, etc.).</td></tr></table><h1>Known RPC errors</h1><p>This request can't cause any RPC error as far as we know.</p><h1 id="examples">Example</h1><pre><strong>from</strong> telethon.sync <strong>import</strong> TelegramClient
<strong>from</strong> telethon <strong>import</strong> functions, types
<strong>with</strong> TelegramClient(name, api_id, api_hash) <strong>as</strong> client:
result = client(functions.bots.GetBotMenuButtonRequest(
user_id=<em>'username'</em>
))
print(result.stringify())</pre><textarea id="c" class="invisible"></textarea><script>function cp(t){var c=document.getElementById("c");c.value=t;c.select();try{document.execCommand("copy")}catch(e){}}</script></div><script>prependPath = "../../";</script><script src="../../js/search.js"></script></body></html>
+25
View File
@@ -0,0 +1,25 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GetBotRecommendationsRequest</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link id="style" href="../../css/docs.dark.css" rel="stylesheet">
<script>
document.getElementById("style").href = "../../css/docs."
+ (localStorage.getItem("theme") || "light")
+ ".css";
</script>
<link href="https://fonts.googleapis.com/css?family=Nunito|Source+Code+Pro"
rel="stylesheet">
</head>
<body>
<div id="main_div"><ul class="horizontal"><li><a href="../../index.html">API</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="../index.html">Methods</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="index.html">Bots</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="get_bot_recommendations.html">GetBotRecommendationsRequest</a></li></ul><h1>GetBotRecommendationsRequest</h1><p>Both users and bots <strong>may</strong> be able to use this request. <a href="#examples">See code examples.</a></p><pre>---functions---
bots.getBotRecommendations#a1b70815 bot:<a href="../../types/input_user.html">InputUser</a> = <a href="../../types/users/users.html">users.Users</a></pre><button onclick="cp('from telethon.tl.functions.bots import GetBotRecommendationsRequest');">Copy import to the clipboard</button><h3>Returns</h3><table><tr><td><a href="../../types/users/users.html">users.Users</a></td></tr></table><p>This type can be an instance of either:</p><table><tr><td><a href="../../constructors/users/users.html">Users</a></td><td><a href="../../constructors/users/users_slice.html">UsersSlice</a></td></tr></table><h3>Parameters</h3><table><tr><td><b>bot</b></td><td style="text-align:center"><a href="../../types/input_user.html">InputUser</a></td><td>Anything entity-like will work if the library can find its <code>Input</code> version (e.g., usernames, <code>Peer</code>, <code>User</code> or <code>Channel</code> objects, etc.).</td></tr></table><h1>Known RPC errors</h1><p>This request can't cause any RPC error as far as we know.</p><h1 id="examples">Example</h1><pre><strong>from</strong> telethon.sync <strong>import</strong> TelegramClient
<strong>from</strong> telethon <strong>import</strong> functions, types
<strong>with</strong> TelegramClient(name, api_id, api_hash) <strong>as</strong> client:
result = client(functions.bots.GetBotRecommendationsRequest(
bot=<em>'username'</em>
))
print(result.stringify())</pre><textarea id="c" class="invisible"></textarea><script>function cp(t){var c=document.getElementById("c");c.value=t;c.select();try{document.execCommand("copy")}catch(e){}}</script></div><script>prependPath = "../../";</script><script src="../../js/search.js"></script></body></html>
+26
View File
@@ -0,0 +1,26 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GetPopularAppBotsRequest</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link id="style" href="../../css/docs.dark.css" rel="stylesheet">
<script>
document.getElementById("style").href = "../../css/docs."
+ (localStorage.getItem("theme") || "light")
+ ".css";
</script>
<link href="https://fonts.googleapis.com/css?family=Nunito|Source+Code+Pro"
rel="stylesheet">
</head>
<body>
<div id="main_div"><ul class="horizontal"><li><a href="../../index.html">API</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="../index.html">Methods</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="index.html">Bots</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="get_popular_app_bots.html">GetPopularAppBotsRequest</a></li></ul><h1>GetPopularAppBotsRequest</h1><p>Both users and bots <strong>may</strong> be able to use this request. <a href="#examples">See code examples.</a></p><pre>---functions---
bots.getPopularAppBots#c2510192 offset:<a href="../../index.html#string">string</a> limit:<a href="../../index.html#int">int</a> = <a href="../../types/bots/popular_app_bots.html">bots.PopularAppBots</a></pre><button onclick="cp('from telethon.tl.functions.bots import GetPopularAppBotsRequest');">Copy import to the clipboard</button><h3>Returns</h3><table><tr><td><a href="../../types/bots/popular_app_bots.html">bots.PopularAppBots</a></td></tr></table><p>This type can only be an instance of:</p><table><tr><td><a href="../../constructors/bots/popular_app_bots.html">PopularAppBots</a></td></tr></table><h3>Parameters</h3><table><tr><td><b>offset</b></td><td style="text-align:center"><a href="../../index.html#string">string</a></td><td></td></tr><tr><td><b>limit</b></td><td style="text-align:center"><a href="../../index.html#int">int</a></td><td></td></tr></table><h1>Known RPC errors</h1><p>This request can't cause any RPC error as far as we know.</p><h1 id="examples">Example</h1><pre><strong>from</strong> telethon.sync <strong>import</strong> TelegramClient
<strong>from</strong> telethon <strong>import</strong> functions, types
<strong>with</strong> TelegramClient(name, api_id, api_hash) <strong>as</strong> client:
result = client(functions.bots.GetPopularAppBotsRequest(
offset=<em>'some string here'</em>,
limit=100
))
print(result.stringify())</pre><textarea id="c" class="invisible"></textarea><script>function cp(t){var c=document.getElementById("c");c.value=t;c.select();try{document.execCommand("copy")}catch(e){}}</script></div><script>prependPath = "../../";</script><script src="../../js/search.js"></script></body></html>
+26
View File
@@ -0,0 +1,26 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GetPreviewInfoRequest</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link id="style" href="../../css/docs.dark.css" rel="stylesheet">
<script>
document.getElementById("style").href = "../../css/docs."
+ (localStorage.getItem("theme") || "light")
+ ".css";
</script>
<link href="https://fonts.googleapis.com/css?family=Nunito|Source+Code+Pro"
rel="stylesheet">
</head>
<body>
<div id="main_div"><ul class="horizontal"><li><a href="../../index.html">API</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="../index.html">Methods</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="index.html">Bots</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="get_preview_info.html">GetPreviewInfoRequest</a></li></ul><h1>GetPreviewInfoRequest</h1><p>Both users and bots <strong>may</strong> be able to use this request. <a href="#examples">See code examples.</a></p><pre>---functions---
bots.getPreviewInfo#423ab3ad bot:<a href="../../types/input_user.html">InputUser</a> lang_code:<a href="../../index.html#string">string</a> = <a href="../../types/bots/preview_info.html">bots.PreviewInfo</a></pre><button onclick="cp('from telethon.tl.functions.bots import GetPreviewInfoRequest');">Copy import to the clipboard</button><h3>Returns</h3><table><tr><td><a href="../../types/bots/preview_info.html">bots.PreviewInfo</a></td></tr></table><p>This type can only be an instance of:</p><table><tr><td><a href="../../constructors/bots/preview_info.html">PreviewInfo</a></td></tr></table><h3>Parameters</h3><table><tr><td><b>bot</b></td><td style="text-align:center"><a href="../../types/input_user.html">InputUser</a></td><td>Anything entity-like will work if the library can find its <code>Input</code> version (e.g., usernames, <code>Peer</code>, <code>User</code> or <code>Channel</code> objects, etc.).</td></tr><tr><td><b>lang_code</b></td><td style="text-align:center"><a href="../../index.html#string">string</a></td><td></td></tr></table><h1>Known RPC errors</h1><p>This request can't cause any RPC error as far as we know.</p><h1 id="examples">Example</h1><pre><strong>from</strong> telethon.sync <strong>import</strong> TelegramClient
<strong>from</strong> telethon <strong>import</strong> functions, types
<strong>with</strong> TelegramClient(name, api_id, api_hash) <strong>as</strong> client:
result = client(functions.bots.GetPreviewInfoRequest(
bot=<em>'username'</em>,
lang_code=<em>'en'</em>
))
print(result.stringify())</pre><textarea id="c" class="invisible"></textarea><script>function cp(t){var c=document.getElementById("c");c.value=t;c.select();try{document.execCommand("copy")}catch(e){}}</script></div><script>prependPath = "../../";</script><script src="../../js/search.js"></script></body></html>
+26
View File
@@ -0,0 +1,26 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GetPreviewMediasRequest</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link id="style" href="../../css/docs.dark.css" rel="stylesheet">
<script>
document.getElementById("style").href = "../../css/docs."
+ (localStorage.getItem("theme") || "light")
+ ".css";
</script>
<link href="https://fonts.googleapis.com/css?family=Nunito|Source+Code+Pro"
rel="stylesheet">
</head>
<body>
<div id="main_div"><ul class="horizontal"><li><a href="../../index.html">API</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="../index.html">Methods</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="index.html">Bots</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="get_preview_medias.html">GetPreviewMediasRequest</a></li></ul><h1>GetPreviewMediasRequest</h1><p>Both users and bots <strong>may</strong> be able to use this request. <a href="#examples">See code examples.</a></p><pre>---functions---
bots.getPreviewMedias#a2a5594d bot:<a href="../../types/input_user.html">InputUser</a> = <a href="../../index.html#vector">Vector</a>&lt;<a href="../../types/bot_preview_media.html">BotPreviewMedia</a>&gt;</pre><button onclick="cp('from telethon.tl.functions.bots import GetPreviewMediasRequest');">Copy import to the clipboard</button><h3>Returns</h3><p>A list of the following type is returned.</p><table><tr><td><a href="../../types/bot_preview_media.html">BotPreviewMedia</a></td></tr></table><p>This type can only be an instance of:</p><table><tr><td><a href="../../constructors/bot_preview_media.html">BotPreviewMedia</a></td></tr></table><h3>Parameters</h3><table><tr><td><b>bot</b></td><td style="text-align:center"><a href="../../types/input_user.html">InputUser</a></td><td>Anything entity-like will work if the library can find its <code>Input</code> version (e.g., usernames, <code>Peer</code>, <code>User</code> or <code>Channel</code> objects, etc.).</td></tr></table><h1>Known RPC errors</h1><p>This request can't cause any RPC error as far as we know.</p><h1 id="examples">Example</h1><pre><strong>from</strong> telethon.sync <strong>import</strong> TelegramClient
<strong>from</strong> telethon <strong>import</strong> functions, types
<strong>with</strong> TelegramClient(name, api_id, api_hash) <strong>as</strong> client:
result = client(functions.bots.GetPreviewMediasRequest(
bot=<em>'username'</em>
))
<strong>for</strong> x <strong>in</strong> result:
print(x)</pre><textarea id="c" class="invisible"></textarea><script>function cp(t){var c=document.getElementById("c");c.value=t;c.select();try{document.execCommand("copy")}catch(e){}}</script></div><script>prependPath = "../../";</script><script src="../../js/search.js"></script></body></html>
+17
View File
@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Methods/Bots</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link id="style" href="../../css/docs.dark.css" rel="stylesheet">
<script>
document.getElementById("style").href = "../../css/docs."
+ (localStorage.getItem("theme") || "light")
+ ".css";
</script>
<link href="https://fonts.googleapis.com/css?family=Nunito|Source+Code+Pro"
rel="stylesheet">
</head>
<body>
<div id="main_div"><ul class="horizontal"><li><a href="../../index.html">API</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="../index.html">Methods</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="index.html">Bots</a></li></ul><h1>Methods/Bots</h1><p>Click <a href="botindex.html">here</a> to view the requests that you can use as a bot.</p><h1>Available items</h1><table><tr><td><a href="add_preview_media.html">AddPreviewMediaRequest</a></td><td><a href="allow_send_message.html">AllowSendMessageRequest</a></td></tr><tr><td><a href="answer_webhook_json_query.html">AnswerWebhookJSONQueryRequest</a></td><td><a href="can_send_message.html">CanSendMessageRequest</a></td></tr><tr><td><a href="check_download_file_params.html">CheckDownloadFileParamsRequest</a></td><td><a href="delete_preview_media.html">DeletePreviewMediaRequest</a></td></tr><tr><td><a href="edit_preview_media.html">EditPreviewMediaRequest</a></td><td><a href="get_admined_bots.html">GetAdminedBotsRequest</a></td></tr><tr><td><a href="get_bot_commands.html">GetBotCommandsRequest</a></td><td><a href="get_bot_info.html">GetBotInfoRequest</a></td></tr><tr><td><a href="get_bot_menu_button.html">GetBotMenuButtonRequest</a></td><td><a href="get_bot_recommendations.html">GetBotRecommendationsRequest</a></td></tr><tr><td><a href="get_popular_app_bots.html">GetPopularAppBotsRequest</a></td><td><a href="get_preview_info.html">GetPreviewInfoRequest</a></td></tr><tr><td><a href="get_preview_medias.html">GetPreviewMediasRequest</a></td><td><a href="invoke_web_view_custom_method.html">InvokeWebViewCustomMethodRequest</a></td></tr><tr><td><a href="reorder_preview_medias.html">ReorderPreviewMediasRequest</a></td><td><a href="reorder_usernames.html">ReorderUsernamesRequest</a></td></tr><tr><td><a href="reset_bot_commands.html">ResetBotCommandsRequest</a></td><td><a href="send_custom_request.html">SendCustomRequestRequest</a></td></tr><tr><td><a href="set_bot_broadcast_default_admin_rights.html">SetBotBroadcastDefaultAdminRightsRequest</a></td><td><a href="set_bot_commands.html">SetBotCommandsRequest</a></td></tr><tr><td><a href="set_bot_group_default_admin_rights.html">SetBotGroupDefaultAdminRightsRequest</a></td><td><a href="set_bot_info.html">SetBotInfoRequest</a></td></tr><tr><td><a href="set_bot_menu_button.html">SetBotMenuButtonRequest</a></td><td><a href="set_custom_verification.html">SetCustomVerificationRequest</a></td></tr><tr><td><a href="toggle_user_emoji_status_permission.html">ToggleUserEmojiStatusPermissionRequest</a></td><td><a href="toggle_username.html">ToggleUsernameRequest</a></td></tr><tr><td><a href="update_star_ref_program.html">UpdateStarRefProgramRequest</a></td><td><a href="update_user_emoji_status.html">UpdateUserEmojiStatusRequest</a></td></tr></table></div></body></html>
@@ -0,0 +1,29 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>InvokeWebViewCustomMethodRequest</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link id="style" href="../../css/docs.dark.css" rel="stylesheet">
<script>
document.getElementById("style").href = "../../css/docs."
+ (localStorage.getItem("theme") || "light")
+ ".css";
</script>
<link href="https://fonts.googleapis.com/css?family=Nunito|Source+Code+Pro"
rel="stylesheet">
</head>
<body>
<div id="main_div"><ul class="horizontal"><li><a href="../../index.html">API</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="../index.html">Methods</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="index.html">Bots</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="invoke_web_view_custom_method.html">InvokeWebViewCustomMethodRequest</a></li></ul><h1>InvokeWebViewCustomMethodRequest</h1><p>Both users and bots <strong>may</strong> be able to use this request. <a href="#examples">See code examples.</a></p><pre>---functions---
bots.invokeWebViewCustomMethod#087fc5e7 bot:<a href="../../types/input_user.html">InputUser</a> custom_method:<a href="../../index.html#string">string</a> params:<a href="../../types/data_json.html">DataJSON</a> = <a href="../../types/data_json.html">DataJSON</a></pre><button onclick="cp('from telethon.tl.functions.bots import InvokeWebViewCustomMethodRequest');">Copy import to the clipboard</button><h3>Returns</h3><table><tr><td><a href="../../types/data_json.html">DataJSON</a></td></tr></table><p>This type can only be an instance of:</p><table><tr><td><a href="../../constructors/data_json.html">DataJSON</a></td></tr></table><h3>Parameters</h3><table><tr><td><b>bot</b></td><td style="text-align:center"><a href="../../types/input_user.html">InputUser</a></td><td>Anything entity-like will work if the library can find its <code>Input</code> version (e.g., usernames, <code>Peer</code>, <code>User</code> or <code>Channel</code> objects, etc.).</td></tr><tr><td><b>custom_method</b></td><td style="text-align:center"><a href="../../index.html#string">string</a></td><td></td></tr><tr><td><b>params</b></td><td style="text-align:center"><a href="../../types/data_json.html">DataJSON</a></td><td></td></tr></table><h1>Known RPC errors</h1><p>This request can't cause any RPC error as far as we know.</p><h1 id="examples">Example</h1><pre><strong>from</strong> telethon.sync <strong>import</strong> TelegramClient
<strong>from</strong> telethon <strong>import</strong> functions, types
<strong>with</strong> TelegramClient(name, api_id, api_hash) <strong>as</strong> client:
result = client(functions.bots.InvokeWebViewCustomMethodRequest(
bot=<em>'username'</em>,
custom_method=<em>'some string here'</em>,
params=types.DataJSON(
data=<em>'some string here'</em>
)
))
print(result.stringify())</pre><textarea id="c" class="invisible"></textarea><script>function cp(t){var c=document.getElementById("c");c.value=t;c.select();try{document.execCommand("copy")}catch(e){}}</script></div><script>prependPath = "../../";</script><script src="../../js/search.js"></script></body></html>
+36
View File
@@ -0,0 +1,36 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>ReorderPreviewMediasRequest</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link id="style" href="../../css/docs.dark.css" rel="stylesheet">
<script>
document.getElementById("style").href = "../../css/docs."
+ (localStorage.getItem("theme") || "light")
+ ".css";
</script>
<link href="https://fonts.googleapis.com/css?family=Nunito|Source+Code+Pro"
rel="stylesheet">
</head>
<body>
<div id="main_div"><ul class="horizontal"><li><a href="../../index.html">API</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="../index.html">Methods</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="index.html">Bots</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="reorder_preview_medias.html">ReorderPreviewMediasRequest</a></li></ul><h1>ReorderPreviewMediasRequest</h1><p>Both users and bots <strong>may</strong> be able to use this request. <a href="#examples">See code examples.</a></p><pre>---functions---
bots.reorderPreviewMedias#b627f3aa bot:<a href="../../types/input_user.html">InputUser</a> lang_code:<a href="../../index.html#string">string</a> order:<a href="../../index.html#vector">Vector</a>&lt;<a href="../../types/input_media.html">InputMedia</a>&gt; = <a href="../../index.html#bool">Bool</a></pre><button onclick="cp('from telethon.tl.functions.bots import ReorderPreviewMediasRequest');">Copy import to the clipboard</button><h3>Returns</h3><table><tr><td><a href="../../index.html#bool">Bool</a></td></tr></table><p>This type has no instances available.</p><table></table><h3>Parameters</h3><table><tr><td><b>bot</b></td><td style="text-align:center"><a href="../../types/input_user.html">InputUser</a></td><td>Anything entity-like will work if the library can find its <code>Input</code> version (e.g., usernames, <code>Peer</code>, <code>User</code> or <code>Channel</code> objects, etc.).</td></tr><tr><td><b>lang_code</b></td><td style="text-align:center"><a href="../../index.html#string">string</a></td><td></td></tr><tr><td><b>order</b></td><td style="text-align:center"><a href="../../types/input_media.html">InputMedia</a></td><td>A <span class="tooltip" title="Any iterable that supports len() will work too">list</span> must be supplied.</td></tr></table><h1>Known RPC errors</h1><p>This request can't cause any RPC error as far as we know.</p><h1 id="examples">Example</h1><pre><strong>from</strong> telethon.sync <strong>import</strong> TelegramClient
<strong>from</strong> telethon <strong>import</strong> functions, types
<strong>with</strong> TelegramClient(name, api_id, api_hash) <strong>as</strong> client:
result = client(functions.bots.ReorderPreviewMediasRequest(
bot=<em>'username'</em>,
lang_code=<em>'en'</em>,
order=[types.InputMediaUploadedPhoto(
file=client.upload_file(<em>'/path/to/file.jpg'</em>),
spoiler=<strong>True</strong>,
stickers=[types.InputDocument(
id=-12398745604826,
access_hash=-12398745604826,
file_reference=<em>b'arbitrary\x7f data \xfa here'</em>
)],
ttl_seconds=42
)]
))
print(result)</pre><textarea id="c" class="invisible"></textarea><script>function cp(t){var c=document.getElementById("c");c.value=t;c.select();try{document.execCommand("copy")}catch(e){}}</script></div><script>prependPath = "../../";</script><script src="../../js/search.js"></script></body></html>
+26
View File
@@ -0,0 +1,26 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>ReorderUsernamesRequest</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link id="style" href="../../css/docs.dark.css" rel="stylesheet">
<script>
document.getElementById("style").href = "../../css/docs."
+ (localStorage.getItem("theme") || "light")
+ ".css";
</script>
<link href="https://fonts.googleapis.com/css?family=Nunito|Source+Code+Pro"
rel="stylesheet">
</head>
<body>
<div id="main_div"><ul class="horizontal"><li><a href="../../index.html">API</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="../index.html">Methods</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="index.html">Bots</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="reorder_usernames.html">ReorderUsernamesRequest</a></li></ul><h1>ReorderUsernamesRequest</h1><p>Both users and bots <strong>may</strong> be able to use this request. <a href="#examples">See code examples.</a></p><pre>---functions---
bots.reorderUsernames#9709b1c2 bot:<a href="../../types/input_user.html">InputUser</a> order:<a href="../../index.html#vector">Vector</a>&lt;<a href="../../index.html#string">string</a>&gt; = <a href="../../index.html#bool">Bool</a></pre><button onclick="cp('from telethon.tl.functions.bots import ReorderUsernamesRequest');">Copy import to the clipboard</button><h3>Returns</h3><table><tr><td><a href="../../index.html#bool">Bool</a></td></tr></table><p>This type has no instances available.</p><table></table><h3>Parameters</h3><table><tr><td><b>bot</b></td><td style="text-align:center"><a href="../../types/input_user.html">InputUser</a></td><td>Anything entity-like will work if the library can find its <code>Input</code> version (e.g., usernames, <code>Peer</code>, <code>User</code> or <code>Channel</code> objects, etc.).</td></tr><tr><td><b>order</b></td><td style="text-align:center"><a href="../../index.html#string">string</a></td><td>A <span class="tooltip" title="Any iterable that supports len() will work too">list</span> must be supplied.</td></tr></table><h1>Known RPC errors</h1><p>This request can't cause any RPC error as far as we know.</p><h1 id="examples">Example</h1><pre><strong>from</strong> telethon.sync <strong>import</strong> TelegramClient
<strong>from</strong> telethon <strong>import</strong> functions, types
<strong>with</strong> TelegramClient(name, api_id, api_hash) <strong>as</strong> client:
result = client(functions.bots.ReorderUsernamesRequest(
bot=<em>'username'</em>,
order=[<em>'some string here'</em>]
))
print(result)</pre><textarea id="c" class="invisible"></textarea><script>function cp(t){var c=document.getElementById("c");c.value=t;c.select();try{document.execCommand("copy")}catch(e){}}</script></div><script>prependPath = "../../";</script><script src="../../js/search.js"></script></body></html>
+26
View File
@@ -0,0 +1,26 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>ResetBotCommandsRequest</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link id="style" href="../../css/docs.dark.css" rel="stylesheet">
<script>
document.getElementById("style").href = "../../css/docs."
+ (localStorage.getItem("theme") || "light")
+ ".css";
</script>
<link href="https://fonts.googleapis.com/css?family=Nunito|Source+Code+Pro"
rel="stylesheet">
</head>
<body>
<div id="main_div"><ul class="horizontal"><li><a href="../../index.html">API</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="../index.html">Methods</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="index.html">Bots</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="reset_bot_commands.html">ResetBotCommandsRequest</a></li></ul><h1>ResetBotCommandsRequest</h1><p>Both users and bots <strong>may</strong> be able to use this request. <a href="#examples">See code examples.</a></p><pre>---functions---
bots.resetBotCommands#3d8de0f9 scope:<a href="../../types/bot_command_scope.html">BotCommandScope</a> lang_code:<a href="../../index.html#string">string</a> = <a href="../../index.html#bool">Bool</a></pre><button onclick="cp('from telethon.tl.functions.bots import ResetBotCommandsRequest');">Copy import to the clipboard</button><h3>Returns</h3><table><tr><td><a href="../../index.html#bool">Bool</a></td></tr></table><p>This type has no instances available.</p><table></table><h3>Parameters</h3><table><tr><td><b>scope</b></td><td style="text-align:center"><a href="../../types/bot_command_scope.html">BotCommandScope</a></td><td></td></tr><tr><td><b>lang_code</b></td><td style="text-align:center"><a href="../../index.html#string">string</a></td><td></td></tr></table><h1>Known RPC errors</h1><p>This request can't cause any RPC error as far as we know.</p><h1 id="examples">Example</h1><pre><strong>from</strong> telethon.sync <strong>import</strong> TelegramClient
<strong>from</strong> telethon <strong>import</strong> functions, types
<strong>with</strong> TelegramClient(name, api_id, api_hash) <strong>as</strong> client:
result = client(functions.bots.ResetBotCommandsRequest(
scope=types.BotCommandScopeDefault(),
lang_code=<em>'en'</em>
))
print(result)</pre><textarea id="c" class="invisible"></textarea><script>function cp(t){var c=document.getElementById("c");c.value=t;c.select();try{document.execCommand("copy")}catch(e){}}</script></div><script>prependPath = "../../";</script><script src="../../js/search.js"></script></body></html>
+28
View File
@@ -0,0 +1,28 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>SendCustomRequestRequest</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link id="style" href="../../css/docs.dark.css" rel="stylesheet">
<script>
document.getElementById("style").href = "../../css/docs."
+ (localStorage.getItem("theme") || "light")
+ ".css";
</script>
<link href="https://fonts.googleapis.com/css?family=Nunito|Source+Code+Pro"
rel="stylesheet">
</head>
<body>
<div id="main_div"><ul class="horizontal"><li><a href="../../index.html">API</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="../index.html">Methods</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="index.html">Bots</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="send_custom_request.html">SendCustomRequestRequest</a></li></ul><h1>SendCustomRequestRequest</h1><p><strong>Only bots</strong> can use this request. <a href="#examples">See code examples.</a></p><pre>---functions---
bots.sendCustomRequest#aa2769ed custom_method:<a href="../../index.html#string">string</a> params:<a href="../../types/data_json.html">DataJSON</a> = <a href="../../types/data_json.html">DataJSON</a></pre><button onclick="cp('from telethon.tl.functions.bots import SendCustomRequestRequest');">Copy import to the clipboard</button><h3>Returns</h3><table><tr><td><a href="../../types/data_json.html">DataJSON</a></td></tr></table><p>This type can only be an instance of:</p><table><tr><td><a href="../../constructors/data_json.html">DataJSON</a></td></tr></table><h3>Parameters</h3><table><tr><td><b>custom_method</b></td><td style="text-align:center"><a href="../../index.html#string">string</a></td><td></td></tr><tr><td><b>params</b></td><td style="text-align:center"><a href="../../types/data_json.html">DataJSON</a></td><td></td></tr></table><h1>Known RPC errors</h1><p>This request can cause 1 known error:</p><table><tr><td><code>UserBotInvalidError</code></td><td>This method can only be called by a bot.</td></tr></table><p>You can import these from <code>telethon.errors</code>.</p><h1 id="examples">Example</h1><pre><strong>from</strong> telethon.sync <strong>import</strong> TelegramClient
<strong>from</strong> telethon <strong>import</strong> functions, types
<strong>with</strong> TelegramClient(name, api_id, api_hash) <strong>as</strong> client:
result = client(functions.bots.SendCustomRequestRequest(
custom_method=<em>'some string here'</em>,
params=types.DataJSON(
data=<em>'some string here'</em>
)
))
print(result.stringify())</pre><textarea id="c" class="invisible"></textarea><script>function cp(t){var c=document.getElementById("c");c.value=t;c.select();try{document.execCommand("copy")}catch(e){}}</script></div><script>prependPath = "../../";</script><script src="../../js/search.js"></script></body></html>
@@ -0,0 +1,42 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>SetBotBroadcastDefaultAdminRightsRequest</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link id="style" href="../../css/docs.dark.css" rel="stylesheet">
<script>
document.getElementById("style").href = "../../css/docs."
+ (localStorage.getItem("theme") || "light")
+ ".css";
</script>
<link href="https://fonts.googleapis.com/css?family=Nunito|Source+Code+Pro"
rel="stylesheet">
</head>
<body>
<div id="main_div"><ul class="horizontal"><li><a href="../../index.html">API</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="../index.html">Methods</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="index.html">Bots</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="set_bot_broadcast_default_admin_rights.html">SetBotBroadcastDefaultAdminRightsRequest</a></li></ul><h1>SetBotBroadcastDefaultAdminRightsRequest</h1><p>Both users and bots <strong>may</strong> be able to use this request. <a href="#examples">See code examples.</a></p><pre>---functions---
bots.setBotBroadcastDefaultAdminRights#788464e1 admin_rights:<a href="../../types/chat_admin_rights.html">ChatAdminRights</a> = <a href="../../index.html#bool">Bool</a></pre><button onclick="cp('from telethon.tl.functions.bots import SetBotBroadcastDefaultAdminRightsRequest');">Copy import to the clipboard</button><h3>Returns</h3><table><tr><td><a href="../../index.html#bool">Bool</a></td></tr></table><p>This type has no instances available.</p><table></table><h3>Parameters</h3><table><tr><td><b>admin_rights</b></td><td style="text-align:center"><a href="../../types/chat_admin_rights.html">ChatAdminRights</a></td><td></td></tr></table><h1>Known RPC errors</h1><p>This request can't cause any RPC error as far as we know.</p><h1 id="examples">Example</h1><pre><strong>from</strong> telethon.sync <strong>import</strong> TelegramClient
<strong>from</strong> telethon <strong>import</strong> functions, types
<strong>with</strong> TelegramClient(name, api_id, api_hash) <strong>as</strong> client:
result = client(functions.bots.SetBotBroadcastDefaultAdminRightsRequest(
admin_rights=types.ChatAdminRights(
change_info=<strong>True</strong>,
post_messages=<strong>True</strong>,
edit_messages=<strong>True</strong>,
delete_messages=<strong>True</strong>,
ban_users=<strong>True</strong>,
invite_users=<strong>True</strong>,
pin_messages=<strong>True</strong>,
add_admins=<strong>True</strong>,
anonymous=<strong>True</strong>,
manage_call=<strong>True</strong>,
other=<strong>True</strong>,
manage_topics=<strong>True</strong>,
post_stories=<strong>True</strong>,
edit_stories=<strong>True</strong>,
delete_stories=<strong>True</strong>,
manage_direct_messages=<strong>True</strong>
)
))
print(result)</pre><textarea id="c" class="invisible"></textarea><script>function cp(t){var c=document.getElementById("c");c.value=t;c.select();try{document.execCommand("copy")}catch(e){}}</script></div><script>prependPath = "../../";</script><script src="../../js/search.js"></script></body></html>
+30
View File
@@ -0,0 +1,30 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>SetBotCommandsRequest</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link id="style" href="../../css/docs.dark.css" rel="stylesheet">
<script>
document.getElementById("style").href = "../../css/docs."
+ (localStorage.getItem("theme") || "light")
+ ".css";
</script>
<link href="https://fonts.googleapis.com/css?family=Nunito|Source+Code+Pro"
rel="stylesheet">
</head>
<body>
<div id="main_div"><ul class="horizontal"><li><a href="../../index.html">API</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="../index.html">Methods</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="index.html">Bots</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="set_bot_commands.html">SetBotCommandsRequest</a></li></ul><h1>SetBotCommandsRequest</h1><p><strong>Only bots</strong> can use this request. <a href="#examples">See code examples.</a></p><pre>---functions---
bots.setBotCommands#0517165a scope:<a href="../../types/bot_command_scope.html">BotCommandScope</a> lang_code:<a href="../../index.html#string">string</a> commands:<a href="../../index.html#vector">Vector</a>&lt;<a href="../../types/bot_command.html">BotCommand</a>&gt; = <a href="../../index.html#bool">Bool</a></pre><button onclick="cp('from telethon.tl.functions.bots import SetBotCommandsRequest');">Copy import to the clipboard</button><h3>Returns</h3><table><tr><td><a href="../../index.html#bool">Bool</a></td></tr></table><p>This type has no instances available.</p><table></table><h3>Parameters</h3><table><tr><td><b>scope</b></td><td style="text-align:center"><a href="../../types/bot_command_scope.html">BotCommandScope</a></td><td></td></tr><tr><td><b>lang_code</b></td><td style="text-align:center"><a href="../../index.html#string">string</a></td><td></td></tr><tr><td><b>commands</b></td><td style="text-align:center"><a href="../../types/bot_command.html">BotCommand</a></td><td>A <span class="tooltip" title="Any iterable that supports len() will work too">list</span> must be supplied.</td></tr></table><h1>Known RPC errors</h1><p>This request can cause 3 known errors:</p><table><tr><td><code>BotCommandDescriptionInvalidError</code></td><td>The command description was empty, too long or had invalid characters used.</td></tr><tr><td><code>BotCommandInvalidError</code></td><td>The specified command is invalid.</td></tr><tr><td><code>LangCodeInvalidError</code></td><td>The specified language code is invalid.</td></tr></table><p>You can import these from <code>telethon.errors</code>.</p><h1 id="examples">Example</h1><pre><strong>from</strong> telethon.sync <strong>import</strong> TelegramClient
<strong>from</strong> telethon <strong>import</strong> functions, types
<strong>with</strong> TelegramClient(name, api_id, api_hash) <strong>as</strong> client:
result = client(functions.bots.SetBotCommandsRequest(
scope=types.BotCommandScopeDefault(),
lang_code=<em>'en'</em>,
commands=[types.BotCommand(
command=<em>'some string here'</em>,
description=<em>'some string here'</em>
)]
))
print(result)</pre><textarea id="c" class="invisible"></textarea><script>function cp(t){var c=document.getElementById("c");c.value=t;c.select();try{document.execCommand("copy")}catch(e){}}</script></div><script>prependPath = "../../";</script><script src="../../js/search.js"></script></body></html>
@@ -0,0 +1,42 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>SetBotGroupDefaultAdminRightsRequest</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link id="style" href="../../css/docs.dark.css" rel="stylesheet">
<script>
document.getElementById("style").href = "../../css/docs."
+ (localStorage.getItem("theme") || "light")
+ ".css";
</script>
<link href="https://fonts.googleapis.com/css?family=Nunito|Source+Code+Pro"
rel="stylesheet">
</head>
<body>
<div id="main_div"><ul class="horizontal"><li><a href="../../index.html">API</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="../index.html">Methods</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="index.html">Bots</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="set_bot_group_default_admin_rights.html">SetBotGroupDefaultAdminRightsRequest</a></li></ul><h1>SetBotGroupDefaultAdminRightsRequest</h1><p>Both users and bots <strong>may</strong> be able to use this request. <a href="#examples">See code examples.</a></p><pre>---functions---
bots.setBotGroupDefaultAdminRights#925ec9ea admin_rights:<a href="../../types/chat_admin_rights.html">ChatAdminRights</a> = <a href="../../index.html#bool">Bool</a></pre><button onclick="cp('from telethon.tl.functions.bots import SetBotGroupDefaultAdminRightsRequest');">Copy import to the clipboard</button><h3>Returns</h3><table><tr><td><a href="../../index.html#bool">Bool</a></td></tr></table><p>This type has no instances available.</p><table></table><h3>Parameters</h3><table><tr><td><b>admin_rights</b></td><td style="text-align:center"><a href="../../types/chat_admin_rights.html">ChatAdminRights</a></td><td></td></tr></table><h1>Known RPC errors</h1><p>This request can't cause any RPC error as far as we know.</p><h1 id="examples">Example</h1><pre><strong>from</strong> telethon.sync <strong>import</strong> TelegramClient
<strong>from</strong> telethon <strong>import</strong> functions, types
<strong>with</strong> TelegramClient(name, api_id, api_hash) <strong>as</strong> client:
result = client(functions.bots.SetBotGroupDefaultAdminRightsRequest(
admin_rights=types.ChatAdminRights(
change_info=<strong>True</strong>,
post_messages=<strong>True</strong>,
edit_messages=<strong>True</strong>,
delete_messages=<strong>True</strong>,
ban_users=<strong>True</strong>,
invite_users=<strong>True</strong>,
pin_messages=<strong>True</strong>,
add_admins=<strong>True</strong>,
anonymous=<strong>True</strong>,
manage_call=<strong>True</strong>,
other=<strong>True</strong>,
manage_topics=<strong>True</strong>,
post_stories=<strong>True</strong>,
edit_stories=<strong>True</strong>,
delete_stories=<strong>True</strong>,
manage_direct_messages=<strong>True</strong>
)
))
print(result)</pre><textarea id="c" class="invisible"></textarea><script>function cp(t){var c=document.getElementById("c");c.value=t;c.select();try{document.execCommand("copy")}catch(e){}}</script></div><script>prependPath = "../../";</script><script src="../../js/search.js"></script></body></html>
+29
View File
@@ -0,0 +1,29 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>SetBotInfoRequest</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link id="style" href="../../css/docs.dark.css" rel="stylesheet">
<script>
document.getElementById("style").href = "../../css/docs."
+ (localStorage.getItem("theme") || "light")
+ ".css";
</script>
<link href="https://fonts.googleapis.com/css?family=Nunito|Source+Code+Pro"
rel="stylesheet">
</head>
<body>
<div id="main_div"><ul class="horizontal"><li><a href="../../index.html">API</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="../index.html">Methods</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="index.html">Bots</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="set_bot_info.html">SetBotInfoRequest</a></li></ul><h1>SetBotInfoRequest</h1><p>Both users and bots <strong>may</strong> be able to use this request. <a href="#examples">See code examples.</a></p><pre>---functions---
bots.setBotInfo#10cf3123 flags:# bot:flags.2?<a href="../../types/input_user.html">InputUser</a> lang_code:<a href="../../index.html#string">string</a> name:flags.3?<a href="../../index.html#string">string</a> about:flags.0?<a href="../../index.html#string">string</a> description:flags.1?<a href="../../index.html#string">string</a> = <a href="../../index.html#bool">Bool</a></pre><button onclick="cp('from telethon.tl.functions.bots import SetBotInfoRequest');">Copy import to the clipboard</button><h3>Returns</h3><table><tr><td><a href="../../index.html#bool">Bool</a></td></tr></table><p>This type has no instances available.</p><table></table><h3>Parameters</h3><table><tr><td><b>lang_code</b></td><td style="text-align:center"><a href="../../index.html#string">string</a></td><td></td></tr><tr><td><b>bot</b></td><td style="text-align:center"><a href="../../types/input_user.html">InputUser</a></td><td>This argument defaults to <code>None</code> and can be omitted. Anything entity-like will work if the library can find its <code>Input</code> version (e.g., usernames, <code>Peer</code>, <code>User</code> or <code>Channel</code> objects, etc.).</td></tr><tr><td><b>name</b></td><td style="text-align:center"><a href="../../index.html#string">string</a></td><td>This argument defaults to <code>None</code> and can be omitted.</td></tr><tr><td><b>about</b></td><td style="text-align:center"><a href="../../index.html#string">string</a></td><td>This argument defaults to <code>None</code> and can be omitted.</td></tr><tr><td><b>description</b></td><td style="text-align:center"><a href="../../index.html#string">string</a></td><td>This argument defaults to <code>None</code> and can be omitted.</td></tr></table><h1>Known RPC errors</h1><p>This request can't cause any RPC error as far as we know.</p><h1 id="examples">Example</h1><pre><strong>from</strong> telethon.sync <strong>import</strong> TelegramClient
<strong>from</strong> telethon <strong>import</strong> functions, types
<strong>with</strong> TelegramClient(name, api_id, api_hash) <strong>as</strong> client:
result = client(functions.bots.SetBotInfoRequest(
lang_code=<em>'en'</em>,
bot=<em>'username'</em>,
name=<em>'some string here'</em>,
about=<em>'some string here'</em>,
description=<em>'some string here'</em>
))
print(result)</pre><textarea id="c" class="invisible"></textarea><script>function cp(t){var c=document.getElementById("c");c.value=t;c.select();try{document.execCommand("copy")}catch(e){}}</script></div><script>prependPath = "../../";</script><script src="../../js/search.js"></script></body></html>
+26
View File
@@ -0,0 +1,26 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>SetBotMenuButtonRequest</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link id="style" href="../../css/docs.dark.css" rel="stylesheet">
<script>
document.getElementById("style").href = "../../css/docs."
+ (localStorage.getItem("theme") || "light")
+ ".css";
</script>
<link href="https://fonts.googleapis.com/css?family=Nunito|Source+Code+Pro"
rel="stylesheet">
</head>
<body>
<div id="main_div"><ul class="horizontal"><li><a href="../../index.html">API</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="../index.html">Methods</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="index.html">Bots</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="set_bot_menu_button.html">SetBotMenuButtonRequest</a></li></ul><h1>SetBotMenuButtonRequest</h1><p>Both users and bots <strong>may</strong> be able to use this request. <a href="#examples">See code examples.</a></p><pre>---functions---
bots.setBotMenuButton#4504d54f user_id:<a href="../../types/input_user.html">InputUser</a> button:<a href="../../types/bot_menu_button.html">BotMenuButton</a> = <a href="../../index.html#bool">Bool</a></pre><button onclick="cp('from telethon.tl.functions.bots import SetBotMenuButtonRequest');">Copy import to the clipboard</button><h3>Returns</h3><table><tr><td><a href="../../index.html#bool">Bool</a></td></tr></table><p>This type has no instances available.</p><table></table><h3>Parameters</h3><table><tr><td><b>user_id</b></td><td style="text-align:center"><a href="../../types/input_user.html">InputUser</a></td><td>Anything entity-like will work if the library can find its <code>Input</code> version (e.g., usernames, <code>Peer</code>, <code>User</code> or <code>Channel</code> objects, etc.).</td></tr><tr><td><b>button</b></td><td style="text-align:center"><a href="../../types/bot_menu_button.html">BotMenuButton</a></td><td></td></tr></table><h1>Known RPC errors</h1><p>This request can't cause any RPC error as far as we know.</p><h1 id="examples">Example</h1><pre><strong>from</strong> telethon.sync <strong>import</strong> TelegramClient
<strong>from</strong> telethon <strong>import</strong> functions, types
<strong>with</strong> TelegramClient(name, api_id, api_hash) <strong>as</strong> client:
result = client(functions.bots.SetBotMenuButtonRequest(
user_id=<em>'username'</em>,
button=types.BotMenuButtonDefault()
))
print(result)</pre><textarea id="c" class="invisible"></textarea><script>function cp(t){var c=document.getElementById("c");c.value=t;c.select();try{document.execCommand("copy")}catch(e){}}</script></div><script>prependPath = "../../";</script><script src="../../js/search.js"></script></body></html>
+28
View File
@@ -0,0 +1,28 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>SetCustomVerificationRequest</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link id="style" href="../../css/docs.dark.css" rel="stylesheet">
<script>
document.getElementById("style").href = "../../css/docs."
+ (localStorage.getItem("theme") || "light")
+ ".css";
</script>
<link href="https://fonts.googleapis.com/css?family=Nunito|Source+Code+Pro"
rel="stylesheet">
</head>
<body>
<div id="main_div"><ul class="horizontal"><li><a href="../../index.html">API</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="../index.html">Methods</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="index.html">Bots</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="set_custom_verification.html">SetCustomVerificationRequest</a></li></ul><h1>SetCustomVerificationRequest</h1><p>Both users and bots <strong>may</strong> be able to use this request. <a href="#examples">See code examples.</a></p><pre>---functions---
bots.setCustomVerification#8b89dfbd flags:# enabled:flags.1?<a href="../../index.html#true">true</a> bot:flags.0?<a href="../../types/input_user.html">InputUser</a> peer:<a href="../../types/input_peer.html">InputPeer</a> custom_description:flags.2?<a href="../../index.html#string">string</a> = <a href="../../index.html#bool">Bool</a></pre><button onclick="cp('from telethon.tl.functions.bots import SetCustomVerificationRequest');">Copy import to the clipboard</button><h3>Returns</h3><table><tr><td><a href="../../index.html#bool">Bool</a></td></tr></table><p>This type has no instances available.</p><table></table><h3>Parameters</h3><table><tr><td><b>peer</b></td><td style="text-align:center"><a href="../../types/input_peer.html">InputPeer</a></td><td>Anything entity-like will work if the library can find its <code>Input</code> version (e.g., usernames, <code>Peer</code>, <code>User</code> or <code>Channel</code> objects, etc.).</td></tr><tr><td><b>enabled</b></td><td style="text-align:center"><a href="../../index.html#true">flag</a></td><td>This argument defaults to <code>None</code> and can be omitted.</td></tr><tr><td><b>bot</b></td><td style="text-align:center"><a href="../../types/input_user.html">InputUser</a></td><td>This argument defaults to <code>None</code> and can be omitted. Anything entity-like will work if the library can find its <code>Input</code> version (e.g., usernames, <code>Peer</code>, <code>User</code> or <code>Channel</code> objects, etc.).</td></tr><tr><td><b>custom_description</b></td><td style="text-align:center"><a href="../../index.html#string">string</a></td><td>This argument defaults to <code>None</code> and can be omitted.</td></tr></table><h1>Known RPC errors</h1><p>This request can't cause any RPC error as far as we know.</p><h1 id="examples">Example</h1><pre><strong>from</strong> telethon.sync <strong>import</strong> TelegramClient
<strong>from</strong> telethon <strong>import</strong> functions, types
<strong>with</strong> TelegramClient(name, api_id, api_hash) <strong>as</strong> client:
result = client(functions.bots.SetCustomVerificationRequest(
peer=<em>'username'</em>,
enabled=<strong>True</strong>,
bot=<em>'username'</em>,
custom_description=<em>'some string here'</em>
))
print(result)</pre><textarea id="c" class="invisible"></textarea><script>function cp(t){var c=document.getElementById("c");c.value=t;c.select();try{document.execCommand("copy")}catch(e){}}</script></div><script>prependPath = "../../";</script><script src="../../js/search.js"></script></body></html>
@@ -0,0 +1,26 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>ToggleUserEmojiStatusPermissionRequest</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link id="style" href="../../css/docs.dark.css" rel="stylesheet">
<script>
document.getElementById("style").href = "../../css/docs."
+ (localStorage.getItem("theme") || "light")
+ ".css";
</script>
<link href="https://fonts.googleapis.com/css?family=Nunito|Source+Code+Pro"
rel="stylesheet">
</head>
<body>
<div id="main_div"><ul class="horizontal"><li><a href="../../index.html">API</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="../index.html">Methods</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="index.html">Bots</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="toggle_user_emoji_status_permission.html">ToggleUserEmojiStatusPermissionRequest</a></li></ul><h1>ToggleUserEmojiStatusPermissionRequest</h1><p>Both users and bots <strong>may</strong> be able to use this request. <a href="#examples">See code examples.</a></p><pre>---functions---
bots.toggleUserEmojiStatusPermission#06de6392 bot:<a href="../../types/input_user.html">InputUser</a> enabled:<a href="../../index.html#bool">Bool</a> = <a href="../../index.html#bool">Bool</a></pre><button onclick="cp('from telethon.tl.functions.bots import ToggleUserEmojiStatusPermissionRequest');">Copy import to the clipboard</button><h3>Returns</h3><table><tr><td><a href="../../index.html#bool">Bool</a></td></tr></table><p>This type has no instances available.</p><table></table><h3>Parameters</h3><table><tr><td><b>bot</b></td><td style="text-align:center"><a href="../../types/input_user.html">InputUser</a></td><td>Anything entity-like will work if the library can find its <code>Input</code> version (e.g., usernames, <code>Peer</code>, <code>User</code> or <code>Channel</code> objects, etc.).</td></tr><tr><td><b>enabled</b></td><td style="text-align:center"><a href="../../index.html#bool">Bool</a></td><td></td></tr></table><h1>Known RPC errors</h1><p>This request can't cause any RPC error as far as we know.</p><h1 id="examples">Example</h1><pre><strong>from</strong> telethon.sync <strong>import</strong> TelegramClient
<strong>from</strong> telethon <strong>import</strong> functions, types
<strong>with</strong> TelegramClient(name, api_id, api_hash) <strong>as</strong> client:
result = client(functions.bots.ToggleUserEmojiStatusPermissionRequest(
bot=<em>'username'</em>,
enabled=<strong>False</strong>
))
print(result)</pre><textarea id="c" class="invisible"></textarea><script>function cp(t){var c=document.getElementById("c");c.value=t;c.select();try{document.execCommand("copy")}catch(e){}}</script></div><script>prependPath = "../../";</script><script src="../../js/search.js"></script></body></html>
+27
View File
@@ -0,0 +1,27 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>ToggleUsernameRequest</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link id="style" href="../../css/docs.dark.css" rel="stylesheet">
<script>
document.getElementById("style").href = "../../css/docs."
+ (localStorage.getItem("theme") || "light")
+ ".css";
</script>
<link href="https://fonts.googleapis.com/css?family=Nunito|Source+Code+Pro"
rel="stylesheet">
</head>
<body>
<div id="main_div"><ul class="horizontal"><li><a href="../../index.html">API</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="../index.html">Methods</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="index.html">Bots</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="toggle_username.html">ToggleUsernameRequest</a></li></ul><h1>ToggleUsernameRequest</h1><p>Both users and bots <strong>may</strong> be able to use this request. <a href="#examples">See code examples.</a></p><pre>---functions---
bots.toggleUsername#053ca973 bot:<a href="../../types/input_user.html">InputUser</a> username:<a href="../../index.html#string">string</a> active:<a href="../../index.html#bool">Bool</a> = <a href="../../index.html#bool">Bool</a></pre><button onclick="cp('from telethon.tl.functions.bots import ToggleUsernameRequest');">Copy import to the clipboard</button><h3>Returns</h3><table><tr><td><a href="../../index.html#bool">Bool</a></td></tr></table><p>This type has no instances available.</p><table></table><h3>Parameters</h3><table><tr><td><b>bot</b></td><td style="text-align:center"><a href="../../types/input_user.html">InputUser</a></td><td>Anything entity-like will work if the library can find its <code>Input</code> version (e.g., usernames, <code>Peer</code>, <code>User</code> or <code>Channel</code> objects, etc.).</td></tr><tr><td><b>username</b></td><td style="text-align:center"><a href="../../index.html#string">string</a></td><td></td></tr><tr><td><b>active</b></td><td style="text-align:center"><a href="../../index.html#bool">Bool</a></td><td></td></tr></table><h1>Known RPC errors</h1><p>This request can't cause any RPC error as far as we know.</p><h1 id="examples">Example</h1><pre><strong>from</strong> telethon.sync <strong>import</strong> TelegramClient
<strong>from</strong> telethon <strong>import</strong> functions, types
<strong>with</strong> TelegramClient(name, api_id, api_hash) <strong>as</strong> client:
result = client(functions.bots.ToggleUsernameRequest(
bot=<em>'username'</em>,
username=<em>'some string here'</em>,
active=<strong>False</strong>
))
print(result)</pre><textarea id="c" class="invisible"></textarea><script>function cp(t){var c=document.getElementById("c");c.value=t;c.select();try{document.execCommand("copy")}catch(e){}}</script></div><script>prependPath = "../../";</script><script src="../../js/search.js"></script></body></html>
+27
View File
@@ -0,0 +1,27 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>UpdateStarRefProgramRequest</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link id="style" href="../../css/docs.dark.css" rel="stylesheet">
<script>
document.getElementById("style").href = "../../css/docs."
+ (localStorage.getItem("theme") || "light")
+ ".css";
</script>
<link href="https://fonts.googleapis.com/css?family=Nunito|Source+Code+Pro"
rel="stylesheet">
</head>
<body>
<div id="main_div"><ul class="horizontal"><li><a href="../../index.html">API</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="../index.html">Methods</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="index.html">Bots</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="update_star_ref_program.html">UpdateStarRefProgramRequest</a></li></ul><h1>UpdateStarRefProgramRequest</h1><p>Both users and bots <strong>may</strong> be able to use this request. <a href="#examples">See code examples.</a></p><pre>---functions---
bots.updateStarRefProgram#778b5ab3 flags:# bot:<a href="../../types/input_user.html">InputUser</a> commission_permille:<a href="../../index.html#int">int</a> duration_months:flags.0?<a href="../../index.html#int">int</a> = <a href="../../types/star_ref_program.html">StarRefProgram</a></pre><button onclick="cp('from telethon.tl.functions.bots import UpdateStarRefProgramRequest');">Copy import to the clipboard</button><h3>Returns</h3><table><tr><td><a href="../../types/star_ref_program.html">StarRefProgram</a></td></tr></table><p>This type can only be an instance of:</p><table><tr><td><a href="../../constructors/star_ref_program.html">StarRefProgram</a></td></tr></table><h3>Parameters</h3><table><tr><td><b>bot</b></td><td style="text-align:center"><a href="../../types/input_user.html">InputUser</a></td><td>Anything entity-like will work if the library can find its <code>Input</code> version (e.g., usernames, <code>Peer</code>, <code>User</code> or <code>Channel</code> objects, etc.).</td></tr><tr><td><b>commission_permille</b></td><td style="text-align:center"><a href="../../index.html#int">int</a></td><td></td></tr><tr><td><b>duration_months</b></td><td style="text-align:center"><a href="../../index.html#int">int</a></td><td>This argument defaults to <code>None</code> and can be omitted.</td></tr></table><h1>Known RPC errors</h1><p>This request can't cause any RPC error as far as we know.</p><h1 id="examples">Example</h1><pre><strong>from</strong> telethon.sync <strong>import</strong> TelegramClient
<strong>from</strong> telethon <strong>import</strong> functions, types
<strong>with</strong> TelegramClient(name, api_id, api_hash) <strong>as</strong> client:
result = client(functions.bots.UpdateStarRefProgramRequest(
bot=<em>'username'</em>,
commission_permille=42,
duration_months=42
))
print(result.stringify())</pre><textarea id="c" class="invisible"></textarea><script>function cp(t){var c=document.getElementById("c");c.value=t;c.select();try{document.execCommand("copy")}catch(e){}}</script></div><script>prependPath = "../../";</script><script src="../../js/search.js"></script></body></html>
@@ -0,0 +1,29 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>UpdateUserEmojiStatusRequest</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link id="style" href="../../css/docs.dark.css" rel="stylesheet">
<script>
document.getElementById("style").href = "../../css/docs."
+ (localStorage.getItem("theme") || "light")
+ ".css";
</script>
<link href="https://fonts.googleapis.com/css?family=Nunito|Source+Code+Pro"
rel="stylesheet">
</head>
<body>
<div id="main_div"><ul class="horizontal"><li><a href="../../index.html">API</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="../index.html">Methods</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="index.html">Bots</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="update_user_emoji_status.html">UpdateUserEmojiStatusRequest</a></li></ul><h1>UpdateUserEmojiStatusRequest</h1><p>Both users and bots <strong>may</strong> be able to use this request. <a href="#examples">See code examples.</a></p><pre>---functions---
bots.updateUserEmojiStatus#ed9f30c5 user_id:<a href="../../types/input_user.html">InputUser</a> emoji_status:<a href="../../types/emoji_status.html">EmojiStatus</a> = <a href="../../index.html#bool">Bool</a></pre><button onclick="cp('from telethon.tl.functions.bots import UpdateUserEmojiStatusRequest');">Copy import to the clipboard</button><h3>Returns</h3><table><tr><td><a href="../../index.html#bool">Bool</a></td></tr></table><p>This type has no instances available.</p><table></table><h3>Parameters</h3><table><tr><td><b>user_id</b></td><td style="text-align:center"><a href="../../types/input_user.html">InputUser</a></td><td>Anything entity-like will work if the library can find its <code>Input</code> version (e.g., usernames, <code>Peer</code>, <code>User</code> or <code>Channel</code> objects, etc.).</td></tr><tr><td><b>emoji_status</b></td><td style="text-align:center"><a href="../../types/emoji_status.html">EmojiStatus</a></td><td></td></tr></table><h1>Known RPC errors</h1><p>This request can't cause any RPC error as far as we know.</p><h1 id="examples">Example</h1><pre><strong>from</strong> telethon.sync <strong>import</strong> TelegramClient
<strong>from</strong> telethon <strong>import</strong> functions, types
<strong>with</strong> TelegramClient(name, api_id, api_hash) <strong>as</strong> client:
result = client(functions.bots.UpdateUserEmojiStatusRequest(
user_id=<em>'username'</em>,
emoji_status=types.EmojiStatus(
document_id=-12398745604826,
until=datetime.datetime(2018, 6, 25)
)
))
print(result)</pre><textarea id="c" class="invisible"></textarea><script>function cp(t){var c=document.getElementById("c");c.value=t;c.select();try{document.execCommand("copy")}catch(e){}}</script></div><script>prependPath = "../../";</script><script src="../../js/search.js"></script></body></html>