Message sending Telegram bot - telegram-bot

In php telegram bot, sending message to all user is sent repeatedly to one person. That is, if there are 1000 users, 50 of them will receive messages over and over again. and nothing goes to the rest. How can I solve this?
I thought all users would be notified. and the server is sending it to the same user over and over again

Related

How to send message to the user by using telegram id and python_telegram_bot library?

I want to send the message to anybody by using his telegramid and python_telegram_bot library.
I can send the message to me by using below code but if I put other's id then I can not send the message and it says chat not found message.
updater = Updater(mybot_token, use_context=True)
updater.bot.send_message(chat_id = receiver_id, text="welcome")
I am not sure why it is only possible to send the message to me, not the others even though I puth the chat_id as their telegram_id.
Bots can only send messages to users that have already started the bot. See the Telegram Bot docs.

Get chat_id from bot to bot conversation

So What Im trying to accomplish is a bot that forwards messages from one specific user to one specific group chat. I started my testing by using my own chat_id and the bot perfectly forwards my messages to the right groupchat.
The problem is tho, that I want to forward messages that I receive from a bot. So I am trying to gather the chat_id between this bot and my bot but I can't get my head around how I should send and/or receive a message from this bot to gather said chat_id because I cant use it's #username in a /sendMessage? URL.
Why doesn't my bot see messages from other bots? Bots talking to each
other could potentially get stuck in unwelcome loops. To avoid this,
we decided that bots will not be able to see messages from other bots
regardless of mode.
Telegram Bots FAQ

Telegram Bot messages

Is it possible that bots send messages in chats only to specific members, and the messages aren't visible for other members of the chat?
For example:
There is a chat with 200 members and the bot is one of them. Somebody sends a command /help and bot responds only to him and others don't see the response
You can't do this at this time, but there are deleteMessage method you might interested.
And there are inline keyboard can ask users to START your bot, just put https://t.me/Bot as URL value.

Send message to th all of bots users (telegram api)

how to send Send message to the all of bots users?
There is no way to sned message to all ?
what is the method name ?
From Official API FAQ:
How can I message all of my bot's subscribers at once?
Unfortunately, at this moment we don't have methods for sending bulk messages, e.g. notifications. We may add something along these lines in the future. (...)
Obviously, if you store users chat_id, you can send individual message to all users (I use this method).
Navid wants to send message to all subscribers via bot.
If subscribers are more than 100 persons bot will very slow to sending all messages and may doesn't send messages to all.
Navid's question was how we can send message without this problem?
you can send with curl_multi_exec
Currently, a developer would need to implement a special broadcasting function that would send the message to each active user at the time adding a small delay to avoid hitting the rate limit of 30 messages per second (see https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once). This would mean that a very popular bot with say 10K active users cannot give timely notification as the last user would get the message about 5 minutes after the first user.
Here is a feature request to ask to add a method in the Bot API to broadcast a message to all its active users at once. You can upvote this feature request. https://bugs.telegram.org/c/8463

How can I send message to specific chatID?

I have chatId and want send messages while execute some tasks from java code. I found this explain on telegram "Bots can't initiate conversations with users. A user must either add them to a group or send them a message first. People can use telegram.me/ links or username search to find your bot." But my task works good when I use https request directly from browser. My bot perfectly answer for requests but how I can do this without user request?
I can not truly understand your case!
Anyway, your bot can send a message to a chat ID Only if the user witch blongs to the specified chat ID added your bot (send start to a bot).
and if it happened then send your message with
/sendMessage