This commit is contained in:
levina 2021-12-11 13:44:02 +07:00 committed by GitHub
parent 7a0976dcd0
commit c8c316d2a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -110,12 +110,14 @@ async def vplay(c: Client, m: Message):
return
else:
try:
user_id = (await user.get_me()).id
link = await c.export_chat_invite_link(chat_id)
if "+" in link:
link_hash = (link.replace("+", "")).split("t.me/")[1]
await ubot.join_chat(link_hash)
await c.promote_member(chat_id, user_id)
invitelink = await c.export_chat_invite_link(
m.chat.id
)
if invitelink.startswith("https://t.me/+"):
invitelink = invitelink.replace(
"https://t.me/+", "https://t.me/joinchat/"
)
await user.join_chat(invitelink)
except UserAlreadyParticipant:
pass
except Exception as e: