phone.SetCallRating

class pyrogram.raw.functions.phone.SetCallRating

Rate a call, returns info about the rating message sent to the official VoIP bot.

Details:
  • Layer: 223

  • ID: 59EAD627

Parameters:
  • peer (InputPhoneCall) – The call to rate

  • rating (int 32-bit) – Rating in 1-5 stars

  • comment (str) – An additional comment

  • user_initiative (bool, optional) – Whether the user decided on their own initiative to rate the call

Returns:

Updates

TL Schema

phone.setCallRating#59ead627
flags:#
user_initiative:flags.0?true
peer:InputPhoneCall
rating:int
comment:string

= Updates

Parameter Tree

SetCallRating
├── user_initiativetrue (optional)
├── peerInputPhoneCall
│ └── InputPhoneCall
│ ├── idlong
│ └── access_hashlong
├── ratingint
└── commentstring

Example

await app.invoke(
    SetCallRating(
        user_initiative=None,
        peer=InputPhoneCall(
            id=0,
            access_hash=0
        ),
        rating=0,
        comment="text",
    )
)