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:

UpdateShortUpdateShortChatMessage
UpdateShortMessageUpdateShortSentMessage
UpdatesUpdatesCombined
UpdatesTooLong

Parameters

peerInputPhoneCall
ratingint
commentstring
user_initiativeflagThis argument defaults to None and can be omitted.

Known RPC errors

This request can cause 1 known error:

CallPeerInvalidErrorThe 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())