I would like to program a crawler bot which would surf channels and find the message with high view counts.
Is it possible to have a bot added to a channel via link?
Is it possible for a bot to read messages broadcast in a channel?
Is it possible for a bot to read view count value of a message in a channel?
If any of the above questions are possible, what is/are the solution(s)?
Only creator/admins can add bots to channels and only as admins.
Bots (for now) can't read messages in channels.
Bots (for now) can't view any counters in channels.
Finally, for now, bots can only post messages to channels and only if added to channel by creator or admin.
Related
I have 2 bots in 1 Group (bot A and bot B).
When a user sends a message to the group, both bots can see it.
But if any of the bots A or B send a message to the group, none of the bots can read the other bot message.
Is it possible that bot can read other bots messages? or messages sent by himself?
The "getUpdates" function returns only mesages from users, not bots, is there a way how to receive group messages sent by bots?
Thanks
You can not. This is a limitation set by Telegram itself.
It is stated clearly in the official Bot documentation under FAQ Section.
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.
Many different media types on Telegram have a file_id and file_unique_id property, such as Stickers, Audio, and Document.
The file_id property is unique to each Telegram bot, so one Telegram bot will not report the same file_id as another Telegram bot will, even if it's the same piece of media.
I want to have two Telegram bots communicate with each other, but they are currently unable to do so because the file_id property is meaningless when one bot tries to talk to the other.
The file_unique_id property is consistent between the bots, but it does not seem like you can do much of anything with that identifier.
Is there any way to pass a reference to a file stored on Telegram's servers from one bot to another, without having to re-upload the file on both bots?
Bot can't interact with each other. But there's a workaround,
we can use channels as a medium (with only BotAPI)
Steps,
Add two bots as admin in channel
Broadcast the messages from Bot A to channel
Now, the Bot B will get these as channel posts and your new fileid
for the same file which will be unique for Bot B (obviously)
You have officially transferred all fileid to Bot B
There aren't any official methods to share fileIds between bots. In fact, you can't even get 2 bots talk to each other, also you won't get bot updates in groups. So bot to bot communication is not possible at all at this moment.
But what you can do is to use Mtproto api and sign-in to telegram as a normal user (with phone number). And follow these steps using the logged in account:
Start both of your bots.
Forward messages you receive from bot 1 to bot 2.
This way you'll be able to access any files in bot 1 in bot 2.
You can use Telethon to write a script that does the job for you, listening to updates coming from bot 1 & forwarding them to bot 2.
Also using normal bot api you should forward received messages to your logged-in account.
The only way is to use a shared channel. Both bots have admin access. However, you may encounter error 429 while transferring the file.
The solution is to send the files to the channel at longer intervals.
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
Requirments:
1- Have a feed of posts that aggregate all posts of multi channels
2- have actions (bot command) on each post
3- When post of channel edited, correspondent post in the telegram bot edited too.
(If it is not possible, I want to know is it possible to edit a message that was sent to multiple recipients in one action or i have to change each of them by message id, chat id)
You can assume you are owner of all these channels and you set your bot as admin of all of them
Only creator/admins can add bots to channels and only as admins.
Bots (for now) can't read messages in channels.
Bots (for now) can't view any counters in channels.
So no such bot for now :(
I am wondering if a slack bot can pull messages that are tagged with a certain string of characters from a private channel and then post that "tagged" message in another channel (private or public). All within the same slack group.
Yes, a Slack bot can do that. But he needs to be invited to a channel (public and private) to be able to monitor it. He then receives all messages in that channel and can react to it in any way you want. Bots can only use a subset of all Slack API methods, but yes they can post a copy of a message to another channel based on keywords.
See the Slack documentation on bots for more information.
Also try setting up a webhook from that slack channel, I've had success with that