-2

I have my own telegram channel and a telegram bot which is also a channel administrator.

  1. How can I get the username of all my subscribers using python(telebot)?
  2. And is it possible to find out by which link the subscriber subscribed to the channel using python(telebot)?
NAZ.42
  • 49
  • 7
  • I rummaged through all the documentation of the telebot and there is nothing there, that's why I asked the question here @wonka – NAZ.42 Jun 10 '22 at 12:24
  • @wonka so show me how to do it with a telebot if you know – NAZ.42 Jun 10 '22 at 12:29

1 Answers1

0

I did not find how to do it with a telebot, but with a pyrogram

from pyrogram import Client

TARGET = -100....
api_id = 91...
api_hash = "2f01....."
link = 'https://t.me/+PP.........'

app = Client("my_account", api_id, api_hash)
async def main():
    async with app:
        async for event in app.get_chat_invite_link_joiners(chat_id=TARGET, invite_link=link):
NAZ.42
  • 49
  • 7