fixed can't join chat
This commit is contained in:
parent
1db61758ad
commit
f8b990e624
@ -100,16 +100,15 @@ async def vplay(c: Client, m: Message):
|
||||
invitelink = invitelink.replace(
|
||||
"https://t.me/+", "https://t.me/joinchat/"
|
||||
)
|
||||
await ubot.join_chat(invitelink)
|
||||
await user.join_chat(invitelink)
|
||||
except UserNotParticipant:
|
||||
try:
|
||||
ubot = (await user.get_me()).id
|
||||
invitelink = await c.export_chat_invite_link(chat_id)
|
||||
if invitelink.startswith("https://t.me/+"):
|
||||
invitelink = invitelink.replace(
|
||||
"https://t.me/+", "https://t.me/joinchat/"
|
||||
)
|
||||
await ubot.join_chat(invitelink)
|
||||
await user.join_chat(invitelink)
|
||||
except UserAlreadyParticipant:
|
||||
pass
|
||||
except Exception as e:
|
||||
@ -346,16 +345,15 @@ async def vstream(c: Client, m: Message):
|
||||
invitelink = invitelink.replace(
|
||||
"https://t.me/+", "https://t.me/joinchat/"
|
||||
)
|
||||
await ubot.join_chat(invitelink)
|
||||
await user.join_chat(invitelink)
|
||||
except UserNotParticipant:
|
||||
try:
|
||||
ubot = (await user.get_me()).id
|
||||
invitelink = await c.export_chat_invite_link(chat_id)
|
||||
if invitelink.startswith("https://t.me/+"):
|
||||
invitelink = invitelink.replace(
|
||||
"https://t.me/+", "https://t.me/joinchat/"
|
||||
)
|
||||
await ubot.join_chat(invitelink)
|
||||
await user.join_chat(invitelink)
|
||||
except UserAlreadyParticipant:
|
||||
pass
|
||||
except Exception as e:
|
||||
|
Loading…
Reference in New Issue
Block a user