Answer the question
In order to leave comments, you need to log in
How to catch? who invited how many to the telegram chat (group)?
Tell me how to catch the event, who and how many users invited to the telegram chat.
@dp.message_handler(content_types=['ChatJoinRequest'])
async def on_user_joined(message: types.Message):
await bot.chat_join_request(
message.chat.id,
message.from_user.id)
await update.message()
@dp.chat_join_request_handler()
async def on_user_joined(message: types.Message):
await bot.chat_join_request(
message.chat.id,
message.from_user.id)
await update.message()
INFO:aiogram.contrib.middlewares.logging:Received chat member update for user [ID:1621id]. Old state: {'user': {'id': 1956id, 'is_bot': False, 'first_name': 'Дмитрий', 'username': 'nik', 'language_code': 'ru'}, 'status': 'left'} New state: {'user': {'id': 195id, 'is_bot': False, 'first_name': 'Дмитрий', 'username': 'nik', 'language_code': 'ru'}, 'status': 'member'}
INFO:aiogram.contrib.middlewares.logging:Process update [ID:2619id]: [success] (in 1 ms)
INFO:aiogram.contrib.middlewares.logging:Received message [ID:20id] in chat [supergroup:-100177id]
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question