SetDiscussionGroupRequest
Only users can use this request. See code examples.
---functions--- channels.setDiscussionGroup#40582bb2 broadcast:InputChannel group:InputChannel = Bool
Returns
Bool |
This type has no instances available.
Parameters
broadcast | InputChannel | Anything entity-like will work if the library can find its Input version (e.g., usernames, Peer , User or Channel objects, etc.). |
group | InputChannel | Anything entity-like will work if the library can find its Input version (e.g., usernames, Peer , User or Channel objects, etc.). |
Known RPC errors
This request can cause 4 known errors:
BroadcastIdInvalidError | The channel is invalid. |
LinkNotModifiedError | The channel is already linked to this group. |
MegagroupIdInvalidError | The group is invalid. |
MegagroupPrehistoryHiddenError | You can't set this discussion group because it's history is hidden. |
You can import these from telethon.errors
.
Example
from telethon.sync import TelegramClient from telethon import functions, types with TelegramClient(name, api_id, api_hash) as client: result = client(functions.channels.SetDiscussionGroupRequest( broadcast='username', group='username' )) print(result)