The HelpSetBotUpdatesStatus method is used exclusively by bots to notify the server about the number of pending updates that have not been processed for a long time. This helps the server track the bot's processing status.
Constraints:
- This method can only be called by a bot. Calling it from a user account will result in a
400 USER_BOT_REQUIRED error.
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.HelpSetBotUpdatesStatus(ctx, &tg.HelpSetBotUpdatesStatusRequest{
PendingUpdatesCount: 100, // Number of pending updates
Message: "Processing delay due to high load", // Error message, if present
})
if err != nil {
return err
}
_ = res // returns bool
return nil
})