mirror of
https://github.com/dreamhunter2333/cloudflare_temp_email.git
synced 2026-04-26 06:15:52 +03:00
[GH-ISSUE #441] [Feature] 建议在 newTelegramBot 函数内初始化 botInfo,可以节约一次查询 #159
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/cloudflare_temp_email#159
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @toadfans on GitHub (Sep 4, 2024).
Original GitHub issue: https://github.com/dreamhunter2333/cloudflare_temp_email/issues/441
请描述您的 Feature
telegraf 会在 handleUpdate 内查询一次 getMe(),可以通过设置 botInfo 跳过,回调接口会稍微快一点
https://github.com/dreamhunter2333/cloudflare_temp_email/blob/main/worker/src/telegram_api/index.ts#L35
https://github.com/telegraf/telegraf/blob/v4/src/telegraf.ts#L329-L333
描述您想要的解决方案
https://github.com/dreamhunter2333/cloudflare_temp_email/blob/main/worker/src/telegram_api/telegram.ts#L47
这里加入
bot.botInfo = {...BOT_INFO}
附加上下文
@dreamhunter2333 commented on GitHub (Sep 4, 2024):
感谢反馈,我之后加上测试一下
@dreamhunter2333 commented on GitHub (Sep 9, 2024):
main 分支已增加