rubenlagus / TelegramBots

Java library to create bots using Telegram Bots API
https://telegram.me/JavaBotsApi
MIT License
4.8k stars 1.23k forks source link

How to get a robot to quickly send a message to 7,000 users. Now I need 1 hour #1378

Closed nieanlei123 closed 5 months ago

nieanlei123 commented 5 months ago

I am using the telegramBot.executeAsync method to send messages to 7000 members. The API states that 19 messages can be sent per second, but in reality, only 2-3 messages can be sent per second. I retrieve the send time and results from callback data. The code snippet is as follows:

telegramBot.executeAsync(tGCommMsg.getResponse()).thenAccept(message -> { saveMessage(message, copyTGCommMsg); });

image

nieanlei123 commented 5 months ago

image I used your image cache ID execute.getPhoto().get(0).getFileId() for sending the picture, so there's no issue with large image size. Why is this bot able to send advertisements so quickly? Link to the bot.

nieanlei123 commented 5 months ago

They have more users than us, but it only takes 20 minutes to send each message to 10,000-20,000 users. image

nieanlei123 commented 5 months ago

image Please do not delete my issue. I want to know how to send 20-30 pieces of data per second. Currently, my bot sends 2-3 pieces of data per second, and I can only send around 130 pieces per minute.

nieanlei123 commented 5 months ago

I need help ~~

Chase22 commented 5 months ago

Spamming people with advertisement is still against telegrams ToS. Please stop opening issues for this