windkh / node-red-contrib-telegrambot

Telegram bot nodes for node-red.
Other
259 stars 116 forks source link

Telegram receiver problem #236

Closed ilexpl01 closed 2 years ago

ilexpl01 commented 2 years ago

Hi

For couple of hours I am trying to get the receiver node to work & ... I am stuck !

Created a new bot, /setprivacy defined to Disabled.

My simple flow:

[{"id":"2a01c586770210e4","type":"tab","label":"Test","disabled":false,"info":"","env":[]},{"id":"90a948b6cd86f534","type":"debug","z":"2a01c586770210e4","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":590,"y":120,"wires":[]},{"id":"c1111678e1e6fb77","type":"telegram receiver","z":"2a01c586770210e4","name":"","bot":"4058a84093c9703e","saveDataDir":"","filterCommands":false,"x":230,"y":140,"wires":[["90a948b6cd86f534"],["90a948b6cd86f534"]]},{"id":"4058a84093c9703e","type":"telegram bot","botname":"bot","usernames":"","chatids":"","baseapiurl":"","updatemode":"polling","pollinterval":"300","usesocks":false,"sockshost":"","socksport":"6667","socksusername":"anonymous","sockspassword":"","bothost":"","botpath":"","localbotport":"8443","publicbotport":"8443","privatekey":"","certificate":"","useselfsignedcertificate":false,"sslterminated":false,"verboselogging":false,"credentials":{}}]

If I write directly to bot, massages are collected by NR but massages form channel not. Bot is added as a subscriber/admin to that channel of course.

If I try simple http request from chrome:

https://api.telegram.org/bot5137304410:AAGUlAfcl7cQa--aIpf_UUwMTIVDhdgykiY/getUpdates

I do get the updates.

Can Anyone give me a hint what do I do wrong ?

Of course this bot is used once in my all my NR flows

NR v 2.2.1 node-red-contrib-telegrambot v 11.2.4

windkh commented 2 years ago

I guess that bots can only send messages in channels. They can not receive messages there. Don't know why this limitation exists.

ilexpl01 commented 2 years ago

Then how come I can read the chat with http request ???

windkh commented 2 years ago

@ilexpl01 to be honest I do not know: the node basically does the same.

You can google for it see https://stackoverflow.com/questions/35131376/telegram-bot-does-not-recieve-messages-from-channels