messages.deleteChatUser

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

messages.statedMessage#d07ae726 message:Message chats:Vector<Chat> users:Vector<User> pts:int seq:int = messages.StatedMessage;
messages.statedMessageLink#a9af2881 message:Message chats:Vector<Chat> users:Vector<User> links:Vector<contacts.Link> pts:int seq:int = messages.StatedMessage;
---functions---
messages.deleteChatUser#c3c5cd23 chat_id:int user_id:InputUser = messages.StatedMessage;

Parameters

Name Type Description
flags # Flags, see TL conditional fields
revoke_history flags.0?true Remove the entire chat history of the specified user in this chat.
chat_id long Chat ID
user_id InputUser User ID to be deleted

Result

Updates

Possible errors

Code Type Description
400 CHAT_ADMIN_REQUIRED You must be an admin in this chat to do this.
400 CHAT_ID_INVALID The provided chat id is invalid.
400 PEER_ID_INVALID The provided peer id is invalid.
400 USER_ID_INVALID The provided user ID is invalid.
400 USER_NOT_PARTICIPANT You're not a member of this supergroup/channel.

Bots can use this method