diff --git a/program/video.py b/program/video.py index ea24085..730c4f6 100644 --- a/program/video.py +++ b/program/video.py @@ -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: