Answer the question
In order to leave comments, you need to log in
How to get the number of participants in a group chat in Telegram in Python?
To get statistics on several Telegram channels, I use the following code:
import telebot
token = '123'
def get_users_in_telegram(channel):
bot = telebot.TeleBot(token)
print(bot.get_chat_member_count(channel))
get_users_in_telegram(channel)
Answer the question
In order to leave comments, you need to log in
In my opinion, it is impossible to work with invite links through bots. It is possible to get the chat ID through the client API, or, through some chatid bot, find out the channel ID and use it in the future, or, in your bot, throw in a similar functionality that simply returns the channel id
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question