G
G
GrimJack2016-12-26 11:42:04
PHP
GrimJack, 2016-12-26 11:42:04

How to collect data via telegram bot api and send a large number of messages at a time?

1. How do you collect user data other than what comes with the message? I heard about nerd.io, but they say he's been a lot of dumb lately.
2. Suppose there is a database with users (who wrote the bot) and there are more than 3000 of them. How to send messages to them more correctly? Since telegrams have a limit of 30 messages per second, the option comes up to pull the cron script every minute to send, but this is extremely inconvenient when there is a division of information into categories and subcategories. And if you send it at a time with a timeout counter in the script, then with each subscriber the script will run longer and longer, which is also not good. The option with a public channel is no longer possible, since no information about subscribers can be obtained (at least I did not find this in the documentation, correct me if I'm wrong).

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
nllm, 2016-12-26
@GrimJack

1. What metrics are needed for which what comes with messages is not enough? To count uniques/views - just fix the events in the database.
2. Distribution through queues. Pause of 1-2 seconds after 20-30 messages.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question