mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-10 10:49:39 +00:00
Update documentation
This commit is contained in:
43
methods/stickers/add_sticker_to_set.html
Normal file
43
methods/stickers/add_sticker_to_set.html
Normal file
@@ -0,0 +1,43 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>AddStickerToSetRequest</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">Stickers</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="add_sticker_to_set.html">AddStickerToSetRequest</a></li></ul><h1>AddStickerToSetRequest</h1><p><strong>Both users and bots</strong> can use this request. <a href="#examples">See code examples.</a></p><pre>---functions---
|
||||
stickers.addStickerToSet#8653febe stickerset:<a href="../../types/input_sticker_set.html">InputStickerSet</a> sticker:<a href="../../types/input_sticker_set_item.html">InputStickerSetItem</a> = <a href="../../types/messages/sticker_set.html">messages.StickerSet</a></pre><button onclick="cp('from telethon.tl.functions.stickers import AddStickerToSetRequest');">Copy import to the clipboard</button><h3>Returns</h3><table><tr><td><a href="../../types/messages/sticker_set.html">messages.StickerSet</a></td></tr></table><p>This type can be an instance of either:</p><table><tr><td><a href="../../constructors/messages/sticker_set.html">StickerSet</a></td><td><a href="../../constructors/messages/sticker_set_not_modified.html">StickerSetNotModified</a></td></tr></table><h3>Parameters</h3><table><tr><td><b>stickerset</b></td><td style="text-align:center"><a href="../../types/input_sticker_set.html">InputStickerSet</a></td><td></td></tr><tr><td><b>sticker</b></td><td style="text-align:center"><a href="../../types/input_sticker_set_item.html">InputStickerSetItem</a></td><td></td></tr></table><h1>Known RPC errors</h1><p>This request can cause 4 known errors:</p><table><tr><td><code>BotMissingError</code></td><td>This method can only be run by a bot.</td></tr><tr><td><code>StickersetInvalidError</code></td><td>The provided sticker set is invalid.</td></tr><tr><td><code>StickerPngNopngError</code></td><td>Stickers must be a png file but the used image was not a png.</td></tr><tr><td><code>StickerTgsNotgsError</code></td><td>Stickers must be a tgs file but the used file was not a tgs.</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.stickers.AddStickerToSetRequest(
|
||||
stickerset=types.InputStickerSetID(
|
||||
id=-12398745604826,
|
||||
access_hash=-12398745604826
|
||||
),
|
||||
sticker=types.InputStickerSetItem(
|
||||
document=types.InputDocument(
|
||||
id=-12398745604826,
|
||||
access_hash=-12398745604826,
|
||||
file_reference=<em>b'arbitrary\x7f data \xfa here'</em>
|
||||
),
|
||||
emoji=<em>'some string here'</em>,
|
||||
mask_coords=types.MaskCoords(
|
||||
n=42,
|
||||
x=7.13,
|
||||
y=7.13,
|
||||
zoom=7.13
|
||||
),
|
||||
keywords=<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>
|
37
methods/stickers/change_sticker.html
Normal file
37
methods/stickers/change_sticker.html
Normal file
@@ -0,0 +1,37 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>ChangeStickerRequest</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">Stickers</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="change_sticker.html">ChangeStickerRequest</a></li></ul><h1>ChangeStickerRequest</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---
|
||||
stickers.changeSticker#f5537ebc flags:# sticker:<a href="../../types/input_document.html">InputDocument</a> emoji:flags.0?<a href="../../index.html#string">string</a> mask_coords:flags.1?<a href="../../types/mask_coords.html">MaskCoords</a> keywords:flags.2?<a href="../../index.html#string">string</a> = <a href="../../types/messages/sticker_set.html">messages.StickerSet</a></pre><button onclick="cp('from telethon.tl.functions.stickers import ChangeStickerRequest');">Copy import to the clipboard</button><h3>Returns</h3><table><tr><td><a href="../../types/messages/sticker_set.html">messages.StickerSet</a></td></tr></table><p>This type can be an instance of either:</p><table><tr><td><a href="../../constructors/messages/sticker_set.html">StickerSet</a></td><td><a href="../../constructors/messages/sticker_set_not_modified.html">StickerSetNotModified</a></td></tr></table><h3>Parameters</h3><table><tr><td><b>sticker</b></td><td style="text-align:center"><a href="../../types/input_document.html">InputDocument</a></td><td></td></tr><tr><td><b>emoji</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>mask_coords</b></td><td style="text-align:center"><a href="../../types/mask_coords.html">MaskCoords</a></td><td>This argument defaults to <code>None</code> and can be omitted.</td></tr><tr><td><b>keywords</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.stickers.ChangeStickerRequest(
|
||||
sticker=types.InputDocument(
|
||||
id=-12398745604826,
|
||||
access_hash=-12398745604826,
|
||||
file_reference=<em>b'arbitrary\x7f data \xfa here'</em>
|
||||
),
|
||||
emoji=<em>'some string here'</em>,
|
||||
mask_coords=types.MaskCoords(
|
||||
n=42,
|
||||
x=7.13,
|
||||
y=7.13,
|
||||
zoom=7.13
|
||||
),
|
||||
keywords=<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>
|
30
methods/stickers/change_sticker_position.html
Normal file
30
methods/stickers/change_sticker_position.html
Normal file
@@ -0,0 +1,30 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>ChangeStickerPositionRequest</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">Stickers</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="change_sticker_position.html">ChangeStickerPositionRequest</a></li></ul><h1>ChangeStickerPositionRequest</h1><p><strong>Only bots</strong> can use this request. <a href="#examples">See code examples.</a></p><pre>---functions---
|
||||
stickers.changeStickerPosition#ffb6d4ca sticker:<a href="../../types/input_document.html">InputDocument</a> position:<a href="../../index.html#int">int</a> = <a href="../../types/messages/sticker_set.html">messages.StickerSet</a></pre><button onclick="cp('from telethon.tl.functions.stickers import ChangeStickerPositionRequest');">Copy import to the clipboard</button><h3>Returns</h3><table><tr><td><a href="../../types/messages/sticker_set.html">messages.StickerSet</a></td></tr></table><p>This type can be an instance of either:</p><table><tr><td><a href="../../constructors/messages/sticker_set.html">StickerSet</a></td><td><a href="../../constructors/messages/sticker_set_not_modified.html">StickerSetNotModified</a></td></tr></table><h3>Parameters</h3><table><tr><td><b>sticker</b></td><td style="text-align:center"><a href="../../types/input_document.html">InputDocument</a></td><td></td></tr><tr><td><b>position</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 cause 2 known errors:</p><table><tr><td><code>BotMissingError</code></td><td>This method can only be run by a bot.</td></tr><tr><td><code>StickerInvalidError</code></td><td>The provided sticker 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.stickers.ChangeStickerPositionRequest(
|
||||
sticker=types.InputDocument(
|
||||
id=-12398745604826,
|
||||
access_hash=-12398745604826,
|
||||
file_reference=<em>b'arbitrary\x7f data \xfa here'</em>
|
||||
),
|
||||
position=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
methods/stickers/check_short_name.html
Normal file
25
methods/stickers/check_short_name.html
Normal file
@@ -0,0 +1,25 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>CheckShortNameRequest</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">Stickers</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="check_short_name.html">CheckShortNameRequest</a></li></ul><h1>CheckShortNameRequest</h1><p><strong>Only users</strong> can use this request. <a href="#examples">See code examples.</a></p><pre>---functions---
|
||||
stickers.checkShortName#284b3639 short_name:<a href="../../index.html#string">string</a> = <a href="../../index.html#bool">Bool</a></pre><button onclick="cp('from telethon.tl.functions.stickers import CheckShortNameRequest');">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>short_name</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 cause 2 known errors:</p><table><tr><td><code>ShortNameInvalidError</code></td><td>The specified short name is invalid.</td></tr><tr><td><code>ShortNameOccupiedError</code></td><td>The specified short name is already in use.</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.stickers.CheckShortNameRequest(
|
||||
short_name=<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>
|
51
methods/stickers/create_sticker_set.html
Normal file
51
methods/stickers/create_sticker_set.html
Normal file
File diff suppressed because one or more lines are too long
28
methods/stickers/delete_sticker_set.html
Normal file
28
methods/stickers/delete_sticker_set.html
Normal file
@@ -0,0 +1,28 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>DeleteStickerSetRequest</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">Stickers</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="delete_sticker_set.html">DeleteStickerSetRequest</a></li></ul><h1>DeleteStickerSetRequest</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---
|
||||
stickers.deleteStickerSet#87704394 stickerset:<a href="../../types/input_sticker_set.html">InputStickerSet</a> = <a href="../../index.html#bool">Bool</a></pre><button onclick="cp('from telethon.tl.functions.stickers import DeleteStickerSetRequest');">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>stickerset</b></td><td style="text-align:center"><a href="../../types/input_sticker_set.html">InputStickerSet</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.stickers.DeleteStickerSetRequest(
|
||||
stickerset=types.InputStickerSetID(
|
||||
id=-12398745604826,
|
||||
access_hash=-12398745604826
|
||||
)
|
||||
))
|
||||
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>
|
17
methods/stickers/index.html
Normal file
17
methods/stickers/index.html
Normal file
@@ -0,0 +1,17 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Methods/Stickers</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">Stickers</a></li></ul><h1>Methods/Stickers</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_sticker_to_set.html">AddStickerToSetRequest</a></td><td><a href="change_sticker_position.html">ChangeStickerPositionRequest</a></td></tr><tr><td><a href="change_sticker.html">ChangeStickerRequest</a></td><td><a href="check_short_name.html">CheckShortNameRequest</a></td></tr><tr><td><a href="create_sticker_set.html">CreateStickerSetRequest</a></td><td><a href="delete_sticker_set.html">DeleteStickerSetRequest</a></td></tr><tr><td><a href="remove_sticker_from_set.html">RemoveStickerFromSetRequest</a></td><td><a href="rename_sticker_set.html">RenameStickerSetRequest</a></td></tr><tr><td><a href="replace_sticker.html">ReplaceStickerRequest</a></td><td><a href="set_sticker_set_thumb.html">SetStickerSetThumbRequest</a></td></tr><tr><td><a href="suggest_short_name.html">SuggestShortNameRequest</a></td></tr></table></div></body></html>
|
29
methods/stickers/remove_sticker_from_set.html
Normal file
29
methods/stickers/remove_sticker_from_set.html
Normal file
@@ -0,0 +1,29 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>RemoveStickerFromSetRequest</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">Stickers</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="remove_sticker_from_set.html">RemoveStickerFromSetRequest</a></li></ul><h1>RemoveStickerFromSetRequest</h1><p><strong>Only bots</strong> can use this request. <a href="#examples">See code examples.</a></p><pre>---functions---
|
||||
stickers.removeStickerFromSet#f7760f51 sticker:<a href="../../types/input_document.html">InputDocument</a> = <a href="../../types/messages/sticker_set.html">messages.StickerSet</a></pre><button onclick="cp('from telethon.tl.functions.stickers import RemoveStickerFromSetRequest');">Copy import to the clipboard</button><h3>Returns</h3><table><tr><td><a href="../../types/messages/sticker_set.html">messages.StickerSet</a></td></tr></table><p>This type can be an instance of either:</p><table><tr><td><a href="../../constructors/messages/sticker_set.html">StickerSet</a></td><td><a href="../../constructors/messages/sticker_set_not_modified.html">StickerSetNotModified</a></td></tr></table><h3>Parameters</h3><table><tr><td><b>sticker</b></td><td style="text-align:center"><a href="../../types/input_document.html">InputDocument</a></td><td></td></tr></table><h1>Known RPC errors</h1><p>This request can cause 2 known errors:</p><table><tr><td><code>BotMissingError</code></td><td>This method can only be run by a bot.</td></tr><tr><td><code>StickerInvalidError</code></td><td>The provided sticker 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.stickers.RemoveStickerFromSetRequest(
|
||||
sticker=types.InputDocument(
|
||||
id=-12398745604826,
|
||||
access_hash=-12398745604826,
|
||||
file_reference=<em>b'arbitrary\x7f data \xfa 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>
|
29
methods/stickers/rename_sticker_set.html
Normal file
29
methods/stickers/rename_sticker_set.html
Normal file
@@ -0,0 +1,29 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>RenameStickerSetRequest</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">Stickers</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="rename_sticker_set.html">RenameStickerSetRequest</a></li></ul><h1>RenameStickerSetRequest</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---
|
||||
stickers.renameStickerSet#124b1c00 stickerset:<a href="../../types/input_sticker_set.html">InputStickerSet</a> title:<a href="../../index.html#string">string</a> = <a href="../../types/messages/sticker_set.html">messages.StickerSet</a></pre><button onclick="cp('from telethon.tl.functions.stickers import RenameStickerSetRequest');">Copy import to the clipboard</button><h3>Returns</h3><table><tr><td><a href="../../types/messages/sticker_set.html">messages.StickerSet</a></td></tr></table><p>This type can be an instance of either:</p><table><tr><td><a href="../../constructors/messages/sticker_set.html">StickerSet</a></td><td><a href="../../constructors/messages/sticker_set_not_modified.html">StickerSetNotModified</a></td></tr></table><h3>Parameters</h3><table><tr><td><b>stickerset</b></td><td style="text-align:center"><a href="../../types/input_sticker_set.html">InputStickerSet</a></td><td></td></tr><tr><td><b>title</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.stickers.RenameStickerSetRequest(
|
||||
stickerset=types.InputStickerSetID(
|
||||
id=-12398745604826,
|
||||
access_hash=-12398745604826
|
||||
),
|
||||
title=<em>'My awesome title'</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>
|
44
methods/stickers/replace_sticker.html
Normal file
44
methods/stickers/replace_sticker.html
Normal file
@@ -0,0 +1,44 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>ReplaceStickerRequest</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">Stickers</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="replace_sticker.html">ReplaceStickerRequest</a></li></ul><h1>ReplaceStickerRequest</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---
|
||||
stickers.replaceSticker#4696459a sticker:<a href="../../types/input_document.html">InputDocument</a> new_sticker:<a href="../../types/input_sticker_set_item.html">InputStickerSetItem</a> = <a href="../../types/messages/sticker_set.html">messages.StickerSet</a></pre><button onclick="cp('from telethon.tl.functions.stickers import ReplaceStickerRequest');">Copy import to the clipboard</button><h3>Returns</h3><table><tr><td><a href="../../types/messages/sticker_set.html">messages.StickerSet</a></td></tr></table><p>This type can be an instance of either:</p><table><tr><td><a href="../../constructors/messages/sticker_set.html">StickerSet</a></td><td><a href="../../constructors/messages/sticker_set_not_modified.html">StickerSetNotModified</a></td></tr></table><h3>Parameters</h3><table><tr><td><b>sticker</b></td><td style="text-align:center"><a href="../../types/input_document.html">InputDocument</a></td><td></td></tr><tr><td><b>new_sticker</b></td><td style="text-align:center"><a href="../../types/input_sticker_set_item.html">InputStickerSetItem</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.stickers.ReplaceStickerRequest(
|
||||
sticker=types.InputDocument(
|
||||
id=-12398745604826,
|
||||
access_hash=-12398745604826,
|
||||
file_reference=<em>b'arbitrary\x7f data \xfa here'</em>
|
||||
),
|
||||
new_sticker=types.InputStickerSetItem(
|
||||
document=types.InputDocument(
|
||||
id=-12398745604826,
|
||||
access_hash=-12398745604826,
|
||||
file_reference=<em>b'arbitrary\x7f data \xfa here'</em>
|
||||
),
|
||||
emoji=<em>'some string here'</em>,
|
||||
mask_coords=types.MaskCoords(
|
||||
n=42,
|
||||
x=7.13,
|
||||
y=7.13,
|
||||
zoom=7.13
|
||||
),
|
||||
keywords=<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>
|
34
methods/stickers/set_sticker_set_thumb.html
Normal file
34
methods/stickers/set_sticker_set_thumb.html
Normal file
@@ -0,0 +1,34 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>SetStickerSetThumbRequest</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">Stickers</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="set_sticker_set_thumb.html">SetStickerSetThumbRequest</a></li></ul><h1>SetStickerSetThumbRequest</h1><p><strong>Only bots</strong> can use this request. <a href="#examples">See code examples.</a></p><pre>---functions---
|
||||
stickers.setStickerSetThumb#a76a5392 flags:# stickerset:<a href="../../types/input_sticker_set.html">InputStickerSet</a> thumb:flags.0?<a href="../../types/input_document.html">InputDocument</a> thumb_document_id:flags.1?<a href="../../index.html#long">long</a> = <a href="../../types/messages/sticker_set.html">messages.StickerSet</a></pre><button onclick="cp('from telethon.tl.functions.stickers import SetStickerSetThumbRequest');">Copy import to the clipboard</button><h3>Returns</h3><table><tr><td><a href="../../types/messages/sticker_set.html">messages.StickerSet</a></td></tr></table><p>This type can be an instance of either:</p><table><tr><td><a href="../../constructors/messages/sticker_set.html">StickerSet</a></td><td><a href="../../constructors/messages/sticker_set_not_modified.html">StickerSetNotModified</a></td></tr></table><h3>Parameters</h3><table><tr><td><b>stickerset</b></td><td style="text-align:center"><a href="../../types/input_sticker_set.html">InputStickerSet</a></td><td></td></tr><tr><td><b>thumb</b></td><td style="text-align:center"><a href="../../types/input_document.html">InputDocument</a></td><td>This argument defaults to <code>None</code> and can be omitted.</td></tr><tr><td><b>thumb_document_id</b></td><td style="text-align:center"><a href="../../index.html#long">long</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 cause 2 known errors:</p><table><tr><td><code>StickerThumbPngNopngError</code></td><td>Stickerset thumb must be a png file but the used file was not png.</td></tr><tr><td><code>StickerThumbTgsNotgsError</code></td><td>Stickerset thumb must be a tgs file but the used file was not tgs.</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.stickers.SetStickerSetThumbRequest(
|
||||
stickerset=types.InputStickerSetID(
|
||||
id=-12398745604826,
|
||||
access_hash=-12398745604826
|
||||
),
|
||||
thumb=types.InputDocument(
|
||||
id=-12398745604826,
|
||||
access_hash=-12398745604826,
|
||||
file_reference=<em>b'arbitrary\x7f data \xfa here'</em>
|
||||
),
|
||||
thumb_document_id=-12398745604826
|
||||
))
|
||||
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
methods/stickers/suggest_short_name.html
Normal file
25
methods/stickers/suggest_short_name.html
Normal file
@@ -0,0 +1,25 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>SuggestShortNameRequest</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">Stickers</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="suggest_short_name.html">SuggestShortNameRequest</a></li></ul><h1>SuggestShortNameRequest</h1><p><strong>Only users</strong> can use this request. <a href="#examples">See code examples.</a></p><pre>---functions---
|
||||
stickers.suggestShortName#4dafc503 title:<a href="../../index.html#string">string</a> = <a href="../../types/stickers/suggested_short_name.html">stickers.SuggestedShortName</a></pre><button onclick="cp('from telethon.tl.functions.stickers import SuggestShortNameRequest');">Copy import to the clipboard</button><h3>Returns</h3><table><tr><td><a href="../../types/stickers/suggested_short_name.html">stickers.SuggestedShortName</a></td></tr></table><p>This type can only be an instance of:</p><table><tr><td><a href="../../constructors/stickers/suggested_short_name.html">SuggestedShortName</a></td></tr></table><h3>Parameters</h3><table><tr><td><b>title</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 cause 1 known error:</p><table><tr><td><code>TitleInvalidError</code></td><td>The specified stickerpack title 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.stickers.SuggestShortNameRequest(
|
||||
title=<em>'My awesome title'</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>
|
Reference in New Issue
Block a user