Layer 224
method Users
messages.editChatAdmin#a85bd1c2 chat_id:long user_id:InputUser is_admin:Bool = Bool;

Parameters

Name Type Description
ChatId long The ID of the group
UserId InputUser The user to make admin
IsAdmin Bool Whether to make them admin

Returns

Bool

Gogram Example

// MessagesEditChatAdmin - positional arguments
result, err := client.MessagesEditChatAdmin(int64(1234567890), &tg.InputUserSelf{}, true)
if err != nil {
    // handle error
}
// result is *tg.Bool

Possible Errors

Code Type Description
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.