From 25394eca7177ef0dc5fa090c160b7c87ebb30c18 Mon Sep 17 00:00:00 2001 From: levina <82658782+levina-lab@users.noreply.github.com> Date: Sat, 12 Feb 2022 11:40:23 +0700 Subject: [PATCH] none --- program/userbot_tools.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/program/userbot_tools.py b/program/userbot_tools.py index 8ed2c79..8ac71f6 100644 --- a/program/userbot_tools.py +++ b/program/userbot_tools.py @@ -1,16 +1,19 @@ import asyncio -from driver.core import user -from pyrogram.types import Message -from pyrogram import Client, filters from config import BOT_USERNAME, SUDO_USERS + +from driver.core import user from driver.filters import command, other_filters from driver.database.dbchat import remove_served_chat from driver.database.dbqueue import remove_active_chat from driver.database.dbpunish import is_gbanned_user -from pyrogram.errors import UserAlreadyParticipant, UserNotParticipant from driver.decorators import authorized_users_only, bot_creator +from pyrogram.types import Message +from pyrogram import Client, filters +from pyrogram.errors import UserAlreadyParticipant, UserNotParticipant + + @Client.on_message( command(["userbotjoin", f"userbotjoin@{BOT_USERNAME}"]) & other_filters @@ -23,7 +26,6 @@ async def join_chat(c: Client, m: Message): await m.reply_text("❗️ **You've blocked from using this bot!**") return try: - # If it exists, use it. invitelink = (await c.get_chat(chat_id)).invite_link if not invitelink: await c.export_chat_invite_link(chat_id)