SetCallRatingRequest
Only users can use this request. See code examples.
---functions--- phone.setCallRating#59ead627 flags:# user_initiative:flags.0?true peer:InputPhoneCall rating:int comment:string = Updates
Returns
Updates |
This type can be an instance of either:
UpdateShort | UpdateShortChatMessage |
UpdateShortMessage | UpdateShortSentMessage |
Updates | UpdatesCombined |
UpdatesTooLong |
Parameters
peer | InputPhoneCall | |
rating | int | |
comment | string | |
user_initiative | flag | This argument defaults to None and can be omitted. |
Known RPC errors
This request can cause 1 known error:
CallPeerInvalidError | The provided call peer object is invalid. |
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.phone.SetCallRatingRequest( peer=types.InputPhoneCall( id=-12398745604826, access_hash=-12398745604826 ), rating=42, comment='some string here', user_initiative=True )) print(result.stringify())