messages.getMessageEditData
Find out if a media message's caption can be edited
func (c *Client) MessagesGetMessageEditData(ctx context.Context, request *MessagesGetMessageEditDataRequest) (*MessagesMessageEditData, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.MessagesGetMessageEditData(ctx, &tg.MessagesGetMessageEditDataRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // *MessagesMessageEditData
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
Peer | InputPeerClass | yes | Peer where the media was sent |
ID | int | yes | ID of message |
Returns
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | CHAT_ADMIN_REQUIRED | You must be an admin in this chat to do this. |
| 403 | CHAT_WRITE_FORBIDDEN | You can't write in this chat. |
| 403 | MESSAGE_AUTHOR_REQUIRED | Message author required. |
| 400 | MESSAGE_ID_INVALID | The provided message id is invalid. |
| 400 | PEER_ID_INVALID | The provided peer id is invalid. |
References
- Official documentation
- Generated Go reference
- TL definition:
messages.getMessageEditData#fda68d36