I have programmed a telegram bot. This works fine when sending to groups or to users. However I do a special requirement. I need to be able to send to another bot. When adding both bots to a group as administrators. I still cannot receive the message with my second bot. I only see it with my real user account, that is added to this group. What am I missing? I used OKHttp to send the message
Request request = new Request.Builder()
.url("https://api.telegram.org/bot"+telSetup.getToken()+"/sendMessage?chat_id="+lAdr+"&parse_mode=HTML&text="+strMessage)
.build();
client.newCall(request).enqueue(new MyIPProcessing(request.toString()));
and
if (response.message().equals("OK")){
List <String> lStr=response.request().url().encodedPathSegments();
...
to receive messages ... which basically works for communication with "real users".
Any ideas welcome ....
According to Bots FAQ
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.
You can connect 2 (or more) bots with a private channel!
Just prompt the bots as admin in the channel.
Then when a bot send a post to the channel, other admin bots can see the message/file/...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With