messages.DeleteChatUser

class pyrogram.raw.functions.messages.DeleteChatUser

Deletes a user from a chat and sends a service message on it.

Details:
  • Layer: 223

  • ID: A2185CAB

Parameters:
  • chat_id (int 64-bit) – Chat ID

  • user_id (InputUser) – User ID to be deleted

  • revoke_history (bool, optional) – Remove the entire chat history of the specified user in this chat.

Returns:

Updates

TL Schema

messages.deleteChatUser#a2185cab
flags:#
revoke_history:flags.0?true
chat_id:long
user_id:InputUser

= Updates

Parameter Tree

DeleteChatUser
├── revoke_historytrue (optional)
├── chat_idlong
└── user_idInputUser
├── InputUserEmpty
├── InputUserSelf
├── InputUser
│ ├── user_idlong
│ └── access_hashlong
├── peerInputPeer
│ ├── InputPeerEmpty
│ ├── InputPeerSelf
│ ├── InputPeerChat
│ ├── InputPeerUser
│ ├── InputPeerChannel
├── msg_idint
└── user_idlong

Example

await app.invoke(
    DeleteChatUser(
        revoke_history=None,
        chat_id=0,
        user_id=await app.resolve_user(chat_id),
    )
)