yagop / node-telegram-bot-api

Telegram Bot API for NodeJS
MIT License
8.3k stars 1.5k forks source link

Question: Is bot missing some messages? #1002

Closed ac1dloop closed 2 years ago

ac1dloop commented 2 years ago

Question

Good day, everyone!

I have bot that listens to messages of any kind and logs into console received message.

bot.on('message', (msg) => { console.log(msg) })

In test chat i have another bot (not mine) which responds to specific messages with text or pictures. For some reason when this (not mine) bot sends any message my bot doesnt receive any event I wonder am i using anything wrong? Since every other event from every other person is processed normally

my code for ref:

`const TGBot = require('node-telegram-bot-api');

const token = process.env.TOKEN

const bot = new TGBot(token)

bot.on('message', (msg) => { console.log(msg) })

bot.startPolling()`

Chat pic for ref: https://postimg.cc/1VB7xhPm

messages 1-3 are captured, and message 4 from bot is not seen at all

danielperez9430 commented 2 years ago

Hi @ac1dloop , the messages send by your bot or others bots don't generate any event. The thing is, bots can't read messages from another bots. Is a Telegram Bot API server side limitation.

ac1dloop commented 2 years ago

It makes sense. With all bot events it would be a lot of processing for server side. Thank you