mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-29 04:43:45 +03:00
29 lines
4.2 KiB
HTML
29 lines
4.2 KiB
HTML
|
<!DOCTYPE html>
|
||
|
<html>
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||
|
<title>InviteToGroupCallRequest</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">Phone</a></li><img src="../../img/arrow.svg" alt="/" /><li><a href="invite_to_group_call.html">InviteToGroupCallRequest</a></li></ul><h1>InviteToGroupCallRequest</h1><p><strong>Only users</strong> can use this request. <a href="#examples">See code examples.</a></p><pre>---functions---
|
||
|
phone.inviteToGroupCall#7b393160 call:<a href="../../types/input_group_call.html">InputGroupCall</a> users:<a href="../../index.html#vector">Vector</a><<a href="../../types/input_user.html">InputUser</a>> = <a href="../../types/updates.html">Updates</a></pre><button onclick="cp('from telethon.tl.functions.phone import InviteToGroupCallRequest');">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>call</b></td><td style="text-align:center"><a href="../../types/input_group_call.html">InputGroupCall</a></td><td></td></tr><tr><td><b>users</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.). 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>GroupcallForbiddenError</code></td><td>The group call has already ended.</td></tr><tr><td><code>InviteForbiddenWithJoinasError</code></td><td>If the user has anonymously joined a group call as a channel, they can't invite other users to the group call because that would cause deanonymization, because the invite would be sent using the original user ID, not the anonymized channel ID.</td></tr><tr><td><code>UserAlreadyInvitedError</code></td><td>You have already invited this user.</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.phone.InviteToGroupCallRequest(
|
||
|
call=types.InputGroupCall(
|
||
|
id=-12398745604826,
|
||
|
access_hash=-12398745604826
|
||
|
),
|
||
|
users=[<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>
|