yagop / node-telegram-bot-api

Telegram Bot API for NodeJS
MIT License
8.45k stars 1.53k forks source link

How can I receive group member status updates even if the group has more than 10k members? #918

Closed DesnLee closed 2 years ago

DesnLee commented 2 years ago

Hello, sir

My bot can‘t receive group member status updates, that group has 24k member and my bot already is admin.

This is my code ⬇️ ⬇️ ⬇️

const TelegramBot = require('node-telegram-bot-api')
const token = `myToken`
const bot = new TelegramBot(token, {
    polling: {
        params: {
            allowed_updates: ["chat_member"]
        }
    }
})

bot.on("polling_error", console.log)

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

What way to fix this? thans!

danielperez9430 commented 2 years ago

Hi DesnLee, you need to setup it manual. First stop your bot and use this url with your bot token. Remplace "" and paste this url in your browser.

https://api.telegram.org/bot<YOUR_BOT_TOKEN>/getUpdates?allowed_updates=["update_id", "message", "edited_message", "channel_post", "edited_channel_post", "inline_query", "chosen_inline_result", "callback_query", "shipping_query", "pre_checkout_query", "poll", "poll_answer", "my_chat_member", "chat_member"]

After do it, you can get the "chat_member" updates.

Mrsayyed commented 2 years ago

I have this problem too please explain more