cotestatnt / AsyncTelegram2

Powerful, flexible and secure Arduino Telegram BOT library. Hardware independent, it can be used with any MCU capable of handling an SSL connection.
MIT License
83 stars 25 forks source link

Sending a command to a bot from a channel #120

Open tiffass opened 10 months ago

tiffass commented 10 months ago

Is it possible to send a command like /command to a bot from a telegram channel (not a group)?

cotestatnt commented 10 months ago

Hi @tiffass As you can read in this FAQ, you can read a message from a channel, but you need to add the bot to the channel.

tiffass commented 10 months ago

Hi @cotestatnt I have a bot connected to a channel and it successfully sends messages there. Now I would like to manage this bot from this same channel. I have enabled privacy mode enabled in the bot settings. But when I send him a command of the form /command@this_bot, the bot does not react to it in any way. If I just send a command to the bot, then everything is OK, I create a group and add the bot there - everything also works. But I'm interested in managing the bot from the channel.

cotestatnt commented 10 months ago

OK I understand your problem. The fact is that the messages received from the channels are slightly different from others. However it is not too complex to add handling of these messages; I'll edit the source and let you know.