Telegram bot 操作群组 A wait of 85685 seconds is required (caused by ResolveUsernameRequest)

将群组的名称更换为群组的数字ID。

Telegram bot 操作群组多次以后,得到一个报错

A wait of 85685 seconds is required (caused by ResolveUsernameRequest)

Google上搜了一圈,发现问题来自于 get_entity() 对于群组名字频繁查询的惩罚。

去bot的源码里搜get_entity,看到除了传入群组名称,还可以传入群组的数字ID。

再经过一番搜索,找到了获得群组数字ID的方法。

参考:https://gist.github.com/mraaroncruz/e76d19f7d61d59419002db54030ebe35

1. Go to https://web.telegram.org

需要手机APP扫二维码登录

2. Click on your channel

3. Look at the URL and find the part that looks like 

https://web.telegram.org/z/#-1492739896


4. Use the part after #

-1492739896

5. Change the prefix from - to -100

-1001492739896

6. That's your channel id.


评论

The Hot3 in Last 7 Days

用 Cloudflare worker 抓取 喷嚏网 浮世汇 生成 RSS

白嫖worker 自建短链服务 Url-Shorten-Worker 变身文件保管站 File Storage 保存到 R2对象存储 搭建手册

KV-woker 纯练手项目 保护 _ 开头的 Key VS code 重构 JS 代码 提取代码为函数