We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
现在cf的免费kv写入次数貌似是1000次,而bot对于每个消息均会将msg id写入到数据库,导致bot一天最多只能免费转发1000次消息,能否改进一下这个机制?
目前的想法: kv 存储 uid 而不是 msg id?
The text was updated successfully, but these errors were encountered:
首先,由于telegram bot api本身没有设计获取message信息的api,所以必须在回调的时候储存某个消息的原始发送者,用户在回复forward的信息的时候,机器人才知道要转发给谁,因此这一步从逻辑上不可避免。或许可以压缩连续相同message的发送者为一个,仅当发送者的id改变的时候进行记录,但这个思路也不是很好设计。
一种可行的思路是用cloudflare d1数据库存储来储存这个映射关系,因为目前d1数据库没有读写次数限制。
参考: bots - How to get message info by ID [Telegram API] - Stack Overflow
Sorry, something went wrong.
No branches or pull requests
现在cf的免费kv写入次数貌似是1000次,而bot对于每个消息均会将msg id写入到数据库,导致bot一天最多只能免费转发1000次消息,能否改进一下这个机制?
目前的想法: kv 存储 uid 而不是 msg id?
The text was updated successfully, but these errors were encountered: