从 bot 到 bot 对话获取 chat_id

Get chat_id from bot to bot conversation

所以我想要完成的是一个将消息从一个特定用户转发到一个特定群聊的机器人。我使用自己的 chat_id 开始测试,该机器人完美地将我的消息转发到正确的群聊。

问题是,我想转发我从 机器人 收到的消息。所以我试图收集这个机器人和我的机器人之间的 chat_id 但我无法理解我应该如何发送 and/or 从这个机器人接收消息以收集所说 chat_id因为我不能在/sendMessage 中使用它的@username? 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