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.


评论

此博客中的热门博文

Woiden IPv6 VPS 搭 V2ray 梯子 VLESS+Websocket+TLS 模式 免费 白嫖 全程手机操作 2022-4-19

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

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