429: Too Many Requests: retry after 18053 only on telegram.sendContact
See original GitHub issueContext
- Telegraf.js Version: “telegraf”: “^3.38.0”,
- Node.js Version: “12.16.3”
- Operating System: Windows 7 64
Expected Behavior
I’ve got an issue with Too many requests only when I try to send a contact via telegram.sendContact. But when I am sending a message via telegram.sendMessage everything is fine.
I think I may have done some loop somewhere haven’t close requests or something which are still pending or something or it’s an issue with the framework.
I already tried to put ctx.answerCb everywhere where I 've found but it did not help.
EDIT: I already tried to start a new project with only this line and I get the error anyway. There must be some updates or something that caused that weird behaviour because before it seemed to work fine for me. I didn’t notice any issues with Contacts
bot.hears(
/(Contacts)|(Контакты)|(Контакти)/i,
//@ts-ignore
getUserInfo,
updateUserActivity,
async (ctx: ITelegramContext) => {
// @ts-ignore
ctx.telegram.sendContact(
//@ts-ignore
**********,
+***********,
"name"
)
}
);
Failure Logs
(node:8620) UnhandledPromiseRejectionWarning: Error: 429: Too Many Requests: retry after 17496
at C:\Users\Валерий\Documents\Projects\TelegramBOT\node_modules\telegraf\core\network\client.js:281:17
at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:8620) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:8620) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Issue Analytics
- State:
- Created 3 years ago
- Comments:11
Top Results From Across the Web
Telegram bot api: Error code 429, Error: Too many requests
The problem is, after a few thousand messages, Telegram starts responding with Error 429: too many requests, and does not accept any requests...
Read more >How to Fix 429 Too Many Requests Error - Kinsta
The HTTP 429 error is returned when too many requests are made to a page within a short period of time. Find out...
Read more >Hitting 429 limit on sendContact only, possible? : r/TelegramBots
I'm receiving 429 error but only for the sendContact API method... No error instead for… ... Many Requests: retry after 69417\" ...
Read more >Telegram limit - Questions - n8n community
Too Many Requests : retry after 37 “message”: “Request failed with status code 429”,. so how to send items to telegram in pack...
Read more >Fix Telegram Too Many Request Try Again Later ... - YouTube
For Query, Follow & Message Us: https://twitter.com/techieraaj1. Online Typing Job: http://bit.ly/onlinetypingjobonline2.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
In Telegram Bot Talk
https://t.me/BotTalk
Just checked it twice right now. I already thought it was the issue but no. There’s some other problem. Thanks for such a soon response!