telegram - Telegram user_id 的长度可以是多少?

标签 telegram telegram-bot python-telegram-bot php-telegram-bot lua-telegram-bot

我正在创建一个数据库,其中我的算法仅接受 Telegram ID 长度为 9 的用户的查询。

user_id: 123456789;
length = user_id.length;
display(length);

OUTPUT: 9

是否存在长度小于 9 的 Telegram 用户 ID?
任何人都可以提出建议,以便我也可以将我的算法更新为该 ID 的长度。>

最佳答案

Unique identifier for this chat. This number may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier.

Telegram Bot API#Chat

关于telegram - Telegram user_id 的长度可以是多少?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51351225/

相关文章:

telegram-bot - Telegram Bot API 的错误代码有引用吗?

java - 如何使用java为电报机器人制作一个url按钮

python - 在 python 中处理 Telegram bot 的多个问题

python-2.7 - Telegram-bot (telepot api) : Is it possible to send an image directly from URL without saving it

bots - 当用户进入组时如何触发方法?

node.js - 使用 Telegram bot(telegraf),nodejs发送markdown文本

telegram - 使用 php 的机器人 Telegram (发送消息和从用户获取消息的关系)

python - 如何使用 Telegram Python 机器人发送粗体文本

php - 如何访问 json 中的特定元素

python - 如何使用 Nginx 反向代理部署 Telegram Bot