messages.migrateChat
Turn a basic group into a supergroup
func (c *Client) MessagesMigrateChat(ctx context.Context, chatid int64) (UpdatesClass, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.MessagesMigrateChat(ctx, chatid)
if err != nil {
return err
}
_ = res // UpdatesClass
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
ChatID | int64 | yes | Basic group to migrate |
Returns
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | CHANNELS_TOO_MUCH | You have joined too many channels/supergroups. |
| 403 | CHAT_ADMIN_REQUIRED | You must be an admin in this chat to do this. |
| 400 | CHAT_ID_INVALID | The provided chat id is invalid. |
| 500 | CHAT_INVALID | Invalid chat. |
| 400 | PEER_ID_INVALID | The provided peer id is invalid. |
References
- Official documentation
- Generated Go reference
- TL definition:
messages.migrateChat#a2875319