Skip to main content

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

NameTypeRequiredDescription
ForceboolSet to true to skip some possibly unneeded updates and reduce server-side load
ChannelInputChannelClassyesThe channel
FilterChannelMessagesFilterClassyesMesssage filter
PtsintyesPersistent timestamp (see updates)
LimitintyesHow many updates to fetch, max 100000Ordinary (non-bot) users are supposed to pass 10-100

Returns

UpdatesChannelDifferenceClass

Possible errors

CodeTypeDescription
400CHANNEL_INVALIDThe provided channel is invalid.
406CHANNEL_PRIVATEYou haven't joined this channel/supergroup.
403CHANNEL_PUBLIC_GROUP_NAchannel/supergroup not available.
400CHAT_NOT_MODIFIEDNo changes were made to chat information because the new information you passed is identical to the current information.
403CHAT_WRITE_FORBIDDENYou can't write in this chat.
400FROM_MESSAGE_BOT_DISABLEDBots can't use fromMessage min constructors.
400FROZEN_PARTICIPANT_MISSINGThe current account is frozen, and cannot access the specified peer.
400MSG_ID_INVALIDInvalid message ID provided.
500NEED_DOC_INVALID
400PERSISTENT_TIMESTAMP_EMPTYPersistent timestamp empty.
400PERSISTENT_TIMESTAMP_INVALIDPersistent timestamp invalid.
500PERSISTENT_TIMESTAMP_OUTDATEDChannel internal replication issues, try again later (treat this like an RPC_CALL_FAIL).
400PINNED_DIALOGS_TOO_MUCHToo many pinned dialogs.
400RANGES_INVALIDInvalid range provided.
400USER_BANNED_IN_CHANNELYou're banned from sending messages in supergroups/channels.

References