I assume update_ids are unique, as the docs state. From what

I gathered it looks like the update_id starts at a random value. Then when using the bot normally each update gets a sequential ID. 1234, 1235, 1236, etc.

After not receiving any updates for at least a week, the update_id will be chosen randomly. Since it's a "unique" identifier, I'd assume that it will be random but larger than the initial value, so it's still unique.

I don't know for sure, why don't you try it out yourself?

3 ответов

28 просмотров

This looks right to me, of course the update id is not a string, it's just an integer, so if your bot gets millions of updates every day for a year it'll reach a max value. Once that happens, it will start back from a low value. I guess this makes it unsuitable to be used as key and not inherently unique.

Thank you

Похожие вопросы

Карта сайта