updates.getChannelDifference
Returns the difference between the current state of updates of a certain channel and transmitted.
func (c *Client) UpdatesGetChannelDifference(ctx context.Context, request *UpdatesGetChannelDifferenceRequest) (UpdatesChannelDifferenceClass, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.UpdatesGetChannelDifference(ctx, &tg.UpdatesGetChannelDifferenceRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // UpdatesChannelDifferenceClass
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
Force | bool | — | Set to true to skip some possibly unneeded updates and reduce server-side load |
Channel | InputChannelClass | yes | The channel |
Filter | ChannelMessagesFilterClass | yes | Messsage filter |
Pts | int | yes | Persistent timestamp (see updates) |
Limit | int | yes | How many updates to fetch, max 100000Ordinary (non-bot) users are supposed to pass 10-100 |
Returns
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | CHANNEL_INVALID | The provided channel is invalid. |
| 406 | CHANNEL_PRIVATE | You haven't joined this channel/supergroup. |
| 403 | CHANNEL_PUBLIC_GROUP_NA | channel/supergroup not available. |
| 400 | CHAT_NOT_MODIFIED | No changes were made to chat information because the new information you passed is identical to the current information. |
| 403 | CHAT_WRITE_FORBIDDEN | You can't write in this chat. |
| 400 | FROM_MESSAGE_BOT_DISABLED | Bots can't use fromMessage min constructors. |
| 400 | FROZEN_PARTICIPANT_MISSING | The current account is frozen, and cannot access the specified peer. |
| 400 | MSG_ID_INVALID | Invalid message ID provided. |
| 500 | NEED_DOC_INVALID | |
| 400 | PERSISTENT_TIMESTAMP_EMPTY | Persistent timestamp empty. |
| 400 | PERSISTENT_TIMESTAMP_INVALID | Persistent timestamp invalid. |
| 500 | PERSISTENT_TIMESTAMP_OUTDATED | Channel internal replication issues, try again later (treat this like an RPC_CALL_FAIL). |
| 400 | PINNED_DIALOGS_TOO_MUCH | Too many pinned dialogs. |
| 400 | RANGES_INVALID | Invalid range provided. |
| 400 | USER_BANNED_IN_CHANNEL | You're banned from sending messages in supergroups/channels. |
References
- Official documentation
- Generated Go reference
- TL definition:
updates.getChannelDifference#3173d78