of my bot users is too large.
My bot is @SOSO
Are there any official technicians here?
something like that? async function sendMessageToChannel(message) { const apiUrl = `https://api.telegram.org/bot${process.env.BOT_TOKEN}/sendMessage`; const data = { chat_id: process.env.CHANNEL_ID, text: message, parse_mode: "HTML", disable_web_page_preview: true, }; try { await axios.post(apiUrl, data); } catch (error) { if (error.response.data.parameters.retry_after) { const timeOut = error.response.data.parameters.retry_after; await sleep(timeOut * 1000); await axios.post(apiUrl, data); } } }
I use pyrogram, all messages are async
In the last hour, I have added tens of thousands of users, and there are probably hundreds of thousands of messages....
point is to handle too many requests and retry?
so ... I want to adjust the API request frequency.
so everything goes through?
Look at your backend logic, I think bottle neck could be in the way you proccess messages and issuing replies. Then again im not an expert or have any pyrogram or python experience. Someone else mb can have a better idea on here.
Обсуждают сегодня