Skip to main content

updates.getDifference

Get new updates.

func (c *Client) UpdatesGetDifference(ctx context.Context, request *UpdatesGetDifferenceRequest) (UpdatesDifferenceClass, error)

Calling this method

client.Run(ctx, func(ctx context.Context) error {
api := client.API()

res, err := api.UpdatesGetDifference(ctx, &tg.UpdatesGetDifferenceRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // UpdatesDifferenceClass
return nil
})

Parameters

NameTypeRequiredDescription
PtsintyesPTS, see updates.
PtsLimitintPTS limit
PtsTotalLimitintFor fast updating: if provided and pts + pts_total_limit < remote pts, updates differenceTooLong will be returned.Simply tells the server to not return the difference if it is bigger than pts_total_limitIf the remote pts is too big (> ~4000000), this field will default to 1000000
Dateintyesdate, see updates.
QtsintyesQTS, see updates.
QtsLimitintQTS limit

Returns

UpdatesDifferenceClass

Possible errors

CodeTypeDescription
400CDN_METHOD_INVALIDYou can't call this method in a CDN DC.
400CHANNEL_INVALIDThe provided channel is invalid.
400CHANNEL_PRIVATEYou haven't joined this channel/supergroup.
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.
400DATE_EMPTYDate empty.
400MSG_ID_INVALIDInvalid message ID provided.
400PERSISTENT_TIMESTAMP_EMPTYPersistent timestamp empty.
400PERSISTENT_TIMESTAMP_INVALIDPersistent timestamp invalid.
500RANDOM_ID_DUPLICATEYou provided a random ID that was already used.
400USERNAME_INVALIDThe provided username is not valid.
400USER_NOT_PARTICIPANTYou're not a member of this supergroup/channel.

References