yagop / node-telegram-bot-api

Telegram Bot API for NodeJS
MIT License
8.13k stars 1.49k forks source link

How to add chat_id of private group or channel #1107

Closed MananKansara09 closed 8 months ago

MananKansara09 commented 11 months ago
danielperez9430 commented 11 months ago

What? You need to have the bot inside the group and in the case of the channel need to be an admin of the channel.

You can use some events like the chat_member update or similar to know when the bot is added is to chat/group and you get the msg object with the chat_id of this chat/group

MananKansara09 commented 11 months ago

Let me try