V
V
Vladislav Pobidash2020-10-29 17:29:41
Bots
Vladislav Pobidash, 2020-10-29 17:29:41

How to get information about a new subscriber to a channel in telegram?

Is it possible for a bot to get data about a new subscriber (at least his id) on the telegram channel where this bot will be placed.

I work with bot-api through Aiogram. I didn’t find such a method in the documentation, maybe I didn’t look for it well, or maybe there’s no such functionality at all, but then the bot for the channel is useless, because it had to send the contact of the new subscriber to the channel admins one by one. If this is impossible to implement - just write so that you do not waste time in vain.

Thanks for the replies!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
soremix, 2020-10-29
@pobedash

The Message object has a new_chat_members field

@dp.message_handler(content_types=types.ContentTypes.NEW_CHAT_MEMBERS)
async def new_chat_member(message: types.Message, chat: Chat):
    # ....

D
Developer, 2020-10-29
@samodum

No.
This is done on purpose so that new subscribers are not spammed.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question