messages.editChatPhoto
Changes chat photo and sends a service message on it
func (c *Client) MessagesEditChatPhoto(ctx context.Context, request *MessagesEditChatPhotoRequest) (UpdatesClass, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.MessagesEditChatPhoto(ctx, &tg.MessagesEditChatPhotoRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // UpdatesClass
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
ChatID | int64 | yes | Chat ID |
Photo | InputChatPhotoClass | yes | Photo to be set |
Returns
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | CHAT_ID_INVALID | The provided chat id is invalid. |
| 400 | CHAT_NOT_MODIFIED | No changes were made to chat information because the new information you passed is identical to the current information. |
| 400 | IMAGE_PROCESS_FAILED | Failure while processing image. |
| 400 | PEER_ID_INVALID | The provided peer id is invalid. |
| 400 | PHOTO_CROP_SIZE_SMALL | Photo is too small. |
| 400 | PHOTO_EXT_INVALID | The extension of the photo is invalid. |
| 400 | PHOTO_INVALID | Photo invalid. |
References
- Official documentation
- Generated Go reference
- TL definition:
messages.editChatPhoto#35ddd674