channel with approval before joining? I need to get users ids who want to join channel
As a user or bot
userbot admin of channel
I think you can't until you enable requests to join
if it needed bot it's also appropriate me
see the example link, to iterate the requesters. to approve use: await client(HideChatJoinRequestRequest(channel_id, user_id, approved=True or False))
Hi again) About this, all works fine thank you, but I have another question. Is it somehow possible to define which link each user used to apply for channel joining?
no. you better use bots with @bot.on(events.Raw(UpdateBotChatInviteRequester)) a user account can't know the join link of join request (with that request alone, and without an owner account)
If I correctly understand each time when user applies to join, my bot will receive this update with lnvite link? Problem is what if I already have some requests to join and want to know which invite link each user used, is it possible?
A convenient answer vastly depends on you usage. and your status in the group, how many potential admins have created the links.. they're not reliable and bots can't get older joins, only real-time
Let's say I have 4 invite links and need to divide users between each link. Links created by one admin, bot or userbot can be admin Bots can't get older, can userbots?
Usebots can, but not with that request as i said, you'll need to know the invite links beforehand, and since admins can't fetch requesters of an invite link they didn't create. you'll need the owner. you can use GetAdminsWithInvites -> passing admin_id to GetExportedChatInvites(..., admin_id=), match ChatInviteExported.request_needed and loop all admins and gather their links, then do same as the previous snippet, and run GetChatInviteImporters(..., requested=True, link='link')) dynamically, it's cumbersome, however, if you know all the potential request join links, jump to last step and pass to link= to get and filter available join requesters by each link; which you can't get unless you're the owner. or the creator admin of the specific link.
Thank you again for detailed reply, it helped 👍
Обсуждают сегодня