Momo Setti
Momo Setti

Reputation: 337

is there a way to setup a listener for a Telegram Bot?

I would like to listen to a Telegram Bot message -the Bot is sort of a weather Bot, and on every new message, I want to get that message- in a programmatic way.

I tried to use another Bot but Telegram doesn't allow interaction Bot-to-Bot!

I will appreciate any help.

Upvotes: 1

Views: 1513

Answers (1)

0stone0
0stone0

Reputation: 44256

Converting my comment to an answer as OP requested to eleborate it.


I would like to listen to a Telegram Bot message in a programmatic way

This is not possible using the Telegram Bot Api. As you already mentioned, Bot-to-Bot interaction is impossible at this point.


Of course, there are a few ways of achieving your desired outcome, I'll mention 2 of them:

  1. Alter the bot you want listen to, let the Bot trigger a custom endpoint/script that will fit your needs

  2. Using the official Telegram TDLib API, you can create your own Telegram Application, this way, you can programmicaly preform any action that a regular Client might do, this include 'listening' to messages from Bots and triggering any kind of webhook to fit your needs

Upvotes: 1

Related Questions