Telegram Bot send Message to bot

风格不统一 提交于 2019-12-20 01:39:51

问题


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 ....


回答1:


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.



来源:https://stackoverflow.com/questions/47617889/telegram-bot-send-message-to-bot

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!