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 30 Days

无服务器 自建短链服务 Url-Shorten-Worker 完整的部署教程

ClouDNS .asia免费域名 托管到CloudFlare开CDN白嫖Websocket WS通道翻墙 / desec.io