thehamkercat 5 lat temu
rodzic
commit
55b53021ef

+ 1 - 0
.gitignore

@@ -1,5 +1,6 @@
 *.m4a
 *.apk
+spam_mod.py
 *.c
 exec
 *.out

+ 5 - 2
sample_config.py

@@ -1,7 +1,10 @@
 from dotenv import load_dotenv
-load_dotenv('config.env')
 
-HEROKU = True  # NOTE Make it false if you're not deploying on heroku or docker.
+load_dotenv("config.env")
+
+HEROKU = (
+    True  # NOTE Make it false if you're not deploying on heroku or docker.
+)
 
 if HEROKU:
     from os import environ

+ 4 - 2
wbb/core/types/__init__.py

@@ -1,4 +1,6 @@
 # flake8: noqa
 
-from .InlineQueryResult import (InlineQueryResultAudio,
-                                InlineQueryResultCachedDocument)
+from .InlineQueryResult import (
+    InlineQueryResultAudio,
+    InlineQueryResultCachedDocument,
+)

+ 41 - 26
wbb/modules/admin.py

@@ -25,13 +25,20 @@ import asyncio
 
 from pyrogram import filters
 from pyrogram.types import (
-        ChatPermissions, Message, CallbackQuery,
-        InlineKeyboardMarkup, InlineKeyboardButton
-        )
+    ChatPermissions,
+    Message,
+    CallbackQuery,
+    InlineKeyboardMarkup,
+    InlineKeyboardButton,
+)
 from wbb import BOT_ID, SUDOERS, app
 from wbb.core.decorators.errors import capture_err
-from wbb.utils.dbfunctions import (add_warn, get_warn, int_to_alpha,
-                                   remove_warns)
+from wbb.utils.dbfunctions import (
+    add_warn,
+    get_warn,
+    int_to_alpha,
+    remove_warns,
+)
 
 __MODULE__ = "Admin"
 __HELP__ = """/ban - Ban A User
@@ -311,7 +318,7 @@ async def pin(_, message: Message):
 @adminsOnly("can_restrict_members")
 async def mute(_, message: Message):
     if len(message.command) == 2:
-        user = (await app.get_users(message.text.split(None, 1)[1]))
+        user = await app.get_users(message.text.split(None, 1)[1])
     elif len(message.command) == 1 and message.reply_to_message:
         user = message.reply_to_message.from_user
     else:
@@ -322,14 +329,18 @@ async def mute(_, message: Message):
         return await message.reply_text("You Wanna Mute The Elevated One?")
     await message.chat.restrict_member(user.id, permissions=ChatPermissions())
     keyboard = InlineKeyboardMarkup(
-                [[
-                    InlineKeyboardButton(
-                        text="🚨   Unmute   🚨",
-                        callback_data=f"unmute_{user.id}"
-                    )
-                ]]
-            )
-    await message.reply_text(f"Enough freedom of speech, Muted {user.mention} !", reply_markup=keyboard)
+        [
+            [
+                InlineKeyboardButton(
+                    text="🚨   Unmute   🚨", callback_data=f"unmute_{user.id}"
+                )
+            ]
+        ]
+    )
+    await message.reply_text(
+        f"Enough freedom of speech, Muted {user.mention} !",
+        reply_markup=keyboard,
+    )
 
 
 # Unmute members
@@ -392,13 +403,15 @@ async def warn_user(_, message: Message):
         if user_id in await list_members(chat_id):
             warns = await get_warn(chat_id, await int_to_alpha(user_id))
             keyboard = InlineKeyboardMarkup(
-                        [[
-                            InlineKeyboardButton(
-                                text="🚨  Remove Warn  🚨",
-                                callback_data=f"unwarn_{user_id}",
-                            )
-                        ]]
-                    )
+                [
+                    [
+                        InlineKeyboardButton(
+                            text="🚨  Remove Warn  🚨",
+                            callback_data=f"unwarn_{user_id}",
+                        )
+                    ]
+                ]
+            )
             if warns:
                 warns = warns["warns"]
             else:
@@ -421,7 +434,9 @@ async def warn_user(_, message: Message):
                     f"Warned {mention} | {warns+1}/3 warnings now.",
                     reply_markup=keyboard,
                 )
-                return await add_warn(chat_id, await int_to_alpha(user_id), warn)
+                return await add_warn(
+                    chat_id, await int_to_alpha(user_id), warn
+                )
         else:
             await message.reply_text("This user isn't here.")
 
@@ -434,10 +449,10 @@ async def remove_warning(_, cq: CallbackQuery):
     permission = "can_restrict_members"
     if permission not in permissions:
         return await cq.answer(
-                "You don't have enough permissions to perform this action.\n"
-                + f"Permission needed: {permission}",
-                show_alert=True,
-                )
+            "You don't have enough permissions to perform this action.\n"
+            + f"Permission needed: {permission}",
+            show_alert=True,
+        )
     user_id = cq.data.split("_")[1]
     warns = await get_warn(chat_id, await int_to_alpha(user_id))
     if warns:

+ 5 - 2
wbb/modules/antiservice.py

@@ -5,8 +5,11 @@ from pyrogram import filters
 
 from wbb import app
 from wbb.core.decorators.permissions import adminsOnly
-from wbb.utils.dbfunctions import (antiservice_off, antiservice_on,
-                                   is_antiservice_on)
+from wbb.utils.dbfunctions import (
+    antiservice_off,
+    antiservice_on,
+    is_antiservice_on,
+)
 
 __MODULE__ = "AntiService"
 __HELP__ = """

+ 5 - 3
wbb/modules/blacklist.py

@@ -30,9 +30,11 @@ from wbb import SUDOERS, app
 from wbb.core.decorators.errors import capture_err
 from wbb.core.decorators.permissions import adminsOnly
 from wbb.modules.admin import list_admins
-from wbb.utils.dbfunctions import (delete_blacklist_filter,
-                                   get_blacklisted_words,
-                                   save_blacklist_filter)
+from wbb.utils.dbfunctions import (
+    delete_blacklist_filter,
+    get_blacklisted_words,
+    save_blacklist_filter,
+)
 from wbb.utils.filter_groups import blacklist_filters_group
 
 __MODULE__ = "Blacklist"

+ 5 - 2
wbb/modules/blacklist_chat.py

@@ -3,8 +3,11 @@ from pyrogram.types import Message
 
 from wbb import SUDOERS, app
 from wbb.core.decorators.errors import capture_err
-from wbb.utils.dbfunctions import (blacklist_chat, blacklisted_chats,
-                                   whitelist_chat)
+from wbb.utils.dbfunctions import (
+    blacklist_chat,
+    blacklisted_chats,
+    whitelist_chat,
+)
 
 __MODULE__ = "Blacklist Chat"
 __HELP__ = """

+ 7 - 3
wbb/modules/chat_watcher.py

@@ -22,9 +22,13 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 SOFTWARE.
 """
 from wbb import app
-from wbb.utils.dbfunctions import (add_served_chat, add_served_user,
-                                   blacklisted_chats, is_served_chat,
-                                   is_served_user)
+from wbb.utils.dbfunctions import (
+    add_served_chat,
+    add_served_user,
+    blacklisted_chats,
+    is_served_chat,
+    is_served_user,
+)
 from wbb.utils.filter_groups import chat_watcher_group
 
 

+ 10 - 2
wbb/modules/chatbot.py

@@ -23,8 +23,16 @@ SOFTWARE.
 """
 from pyrogram import filters
 
-from wbb import (BOT_ID, SUDOERS, USERBOT_ID, USERBOT_PREFIX, USERBOT_USERNAME,
-                 app, app2, arq)
+from wbb import (
+    BOT_ID,
+    SUDOERS,
+    USERBOT_ID,
+    USERBOT_PREFIX,
+    USERBOT_USERNAME,
+    app,
+    app2,
+    arq,
+)
 from wbb.core.decorators.errors import capture_err
 from wbb.modules.userbot import edit_or_reply
 from wbb.utils.filter_groups import chatbot_group

+ 6 - 2
wbb/modules/filters.py

@@ -28,8 +28,12 @@ from pyrogram import filters
 from wbb import app
 from wbb.core.decorators.errors import capture_err
 from wbb.core.decorators.permissions import adminsOnly
-from wbb.utils.dbfunctions import (delete_filter, get_filter,
-                                   get_filters_names, save_filter)
+from wbb.utils.dbfunctions import (
+    delete_filter,
+    get_filter,
+    get_filters_names,
+    save_filter,
+)
 from wbb.utils.filter_groups import chat_filters_group
 
 __MODULE__ = "Filters"

+ 34 - 26
wbb/modules/flood.py

@@ -23,9 +23,12 @@ SOFTWARE.
 """
 from pyrogram import filters
 from pyrogram.types import (
-        Message, ChatPermissions, CallbackQuery,
-        InlineKeyboardMarkup, InlineKeyboardButton
-        )
+    Message,
+    ChatPermissions,
+    CallbackQuery,
+    InlineKeyboardMarkup,
+    InlineKeyboardButton,
+)
 from time import time
 
 from wbb import app, SUDOERS
@@ -41,14 +44,17 @@ Except for admins ofc, and no, you can't change the number of messages or action
 """
 
 
-DB = {} # NOTE Use mongodb instead of a fucking dict.
+DB = {}  # NOTE Use mongodb instead of a fucking dict.
+
 
 @app.on_message(
-        ~filters.service
-        & ~filters.me
-        & ~filters.private
-        & ~filters.channel,
-        group=flood_group)
+    ~filters.service
+    & ~filters.me
+    & ~filters.private
+    & ~filters.channel
+    & ~filters.edited,
+    group=flood_group,
+)
 @capture_err
 async def flood_control_func(_, message: Message):
     if not message.from_user:
@@ -56,7 +62,7 @@ async def flood_control_func(_, message: Message):
     user_id = message.from_user.id
     mention = message.from_user.mention
     chat_id = message.chat.id
-    
+
     # Ignore devs and admins
     mods = (await list_admins(chat_id)) + SUDOERS
     if user_id in mods:
@@ -67,7 +73,7 @@ async def flood_control_func(_, message: Message):
         DB[chat_id] = {}
     if user_id not in DB[chat_id]:
         DB[chat_id][user_id] = 0
-    
+
     # Reset every other user's flood count if someone else sends a message.
     for user in DB[chat_id].keys():
         if user != user_id:
@@ -78,24 +84,26 @@ async def flood_control_func(_, message: Message):
         DB[chat_id][user_id] = 0
         try:
             await message.chat.restrict_member(
-                    user_id,
-                    permissions=ChatPermissions(),
-                    until_date=int(time() + 3600)
-                    )
+                user_id,
+                permissions=ChatPermissions(),
+                until_date=int(time() + 3600),
+            )
         except Exception:
             return
         keyboard = InlineKeyboardMarkup(
-                [[
+            [
+                [
                     InlineKeyboardButton(
                         text="🚨   Unmute   🚨",
-                        callback_data=f"unmute_{user_id}"
+                        callback_data=f"unmute_{user_id}",
                     )
-                ]]
-            )
+                ]
+            ]
+        )
         return await message.reply_text(
-                f"Imagine flooding the chat in front of me, Muted {mention} for an hour!",
-                reply_markup=keyboard
-                )
+            f"Imagine flooding the chat in front of me, Muted {mention} for an hour!",
+            reply_markup=keyboard,
+        )
     DB[chat_id][user_id] += 1
 
 
@@ -106,10 +114,10 @@ async def flood_callback_func(_, cq: CallbackQuery):
     permission = "can_restrict_members"
     if permission not in permissions:
         return await cq.answer(
-                "You don't have enough permissions to perform this action.\n"
-                + f"Permission needed: {permission}",
-                show_alert=True,
-                )
+            "You don't have enough permissions to perform this action.\n"
+            + f"Permission needed: {permission}",
+            show_alert=True,
+        )
     user_id = cq.data.split("_")[1]
     await cq.message.chat.unban_member(user_id)
     text = cq.message.text.markdown

+ 11 - 5
wbb/modules/global_stats.py

@@ -28,11 +28,17 @@ from pyrogram import filters
 from wbb import BOT_ID, BOT_NAME, SUDOERS, app
 from wbb.core.decorators.errors import capture_err
 from wbb.modules import ALL_MODULES
-from wbb.utils.dbfunctions import (get_blacklist_filters_count,
-                                   get_filters_count, get_gbans_count,
-                                   get_karmas_count, get_notes_count,
-                                   get_served_chats, get_served_users,
-                                   get_warns_count, remove_served_chat)
+from wbb.utils.dbfunctions import (
+    get_blacklist_filters_count,
+    get_filters_count,
+    get_gbans_count,
+    get_karmas_count,
+    get_notes_count,
+    get_served_chats,
+    get_served_users,
+    get_warns_count,
+    remove_served_chat,
+)
 from wbb.utils.fetch import fetch
 from wbb.utils.inlinefuncs import keywords_list
 

+ 22 - 8
wbb/modules/greetings.py

@@ -29,18 +29,32 @@ from random import shuffle
 
 from pykeyboard import InlineKeyboard
 from pyrogram import filters
-from pyrogram.errors.exceptions.bad_request_400 import (ChatAdminRequired,
-                                                        UserNotParticipant)
-from pyrogram.types import (ChatPermissions, InlineKeyboardButton,
-                            InlineKeyboardMarkup, Message, User)
+from pyrogram.errors.exceptions.bad_request_400 import (
+    ChatAdminRequired,
+    UserNotParticipant,
+)
+from pyrogram.types import (
+    ChatPermissions,
+    InlineKeyboardButton,
+    InlineKeyboardMarkup,
+    Message,
+    User,
+)
 
 from wbb import SUDOERS, WELCOME_DELAY_KICK_SEC, app
 from wbb.core.decorators.errors import capture_err
 from wbb.core.decorators.permissions import adminsOnly
-from wbb.utils.dbfunctions import (captcha_off, captcha_on, del_welcome,
-                                   get_captcha_cache, get_welcome,
-                                   is_captcha_on, is_gbanned_user, set_welcome,
-                                   update_captcha_cache)
+from wbb.utils.dbfunctions import (
+    captcha_off,
+    captcha_on,
+    del_welcome,
+    get_captcha_cache,
+    get_welcome,
+    is_captcha_on,
+    is_gbanned_user,
+    set_welcome,
+    update_captcha_cache,
+)
 from wbb.utils.filter_groups import welcome_captcha_group
 from wbb.utils.functions import generate_captcha
 

+ 10 - 3
wbb/modules/karma.py

@@ -29,9 +29,16 @@ from pyrogram import filters
 from wbb import app
 from wbb.core.decorators.errors import capture_err
 from wbb.core.decorators.permissions import adminsOnly
-from wbb.utils.dbfunctions import (alpha_to_int, get_karma, get_karmas,
-                                   int_to_alpha, is_karma_on, karma_off,
-                                   karma_on, update_karma)
+from wbb.utils.dbfunctions import (
+    alpha_to_int,
+    get_karma,
+    get_karmas,
+    int_to_alpha,
+    is_karma_on,
+    karma_off,
+    karma_on,
+    update_karma,
+)
 from wbb.utils.filter_groups import karma_negative_group, karma_positive_group
 
 __MODULE__ = "Karma"

+ 6 - 2
wbb/modules/notes.py

@@ -26,8 +26,12 @@ from pyrogram import filters
 from wbb import app
 from wbb.core.decorators.errors import capture_err
 from wbb.core.decorators.permissions import adminsOnly
-from wbb.utils.dbfunctions import (delete_note, get_note, get_note_names,
-                                   save_note)
+from wbb.utils.dbfunctions import (
+    delete_note,
+    get_note,
+    get_note_names,
+    save_note,
+)
 
 __MODULE__ = "Notes"
 __HELP__ = """/notes To Get All The Notes In The Chat.

+ 6 - 2
wbb/modules/pipes.py

@@ -28,8 +28,12 @@ from pyrogram.types import Message
 
 from wbb import BOT_ID, SUDOERS, USERBOT_ID, app, app2
 from wbb.core.decorators.errors import capture_err
-from wbb.utils.dbfunctions import (activate_pipe, deactivate_pipe,
-                                   is_pipe_active, show_pipes)
+from wbb.utils.dbfunctions import (
+    activate_pipe,
+    deactivate_pipe,
+    is_pipe_active,
+    show_pipes,
+)
 from wbb.utils.filter_groups import pipes_group
 
 __MODULE__ = "Pipes"

+ 5 - 2
wbb/modules/pmpermit.py

@@ -27,8 +27,11 @@ from pyrogram import filters
 from wbb import BOT_ID, SUDOERS, USERBOT_ID, USERBOT_PREFIX, app, app2
 from wbb.core.decorators.errors import capture_err
 from wbb.modules.userbot import edit_or_reply
-from wbb.utils.dbfunctions import (approve_pmpermit, disapprove_pmpermit,
-                                   is_pmpermit_approved)
+from wbb.utils.dbfunctions import (
+    approve_pmpermit,
+    disapprove_pmpermit,
+    is_pmpermit_approved,
+)
 
 flood = {}
 

+ 7 - 2
wbb/modules/rice.py

@@ -22,8 +22,13 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 SOFTWARE.
 """
 from pyrogram import filters
-from pyrogram.types import (InlineKeyboardButton, InlineKeyboardMarkup,
-                            InputMediaPhoto, InputMediaVideo, Message)
+from pyrogram.types import (
+    InlineKeyboardButton,
+    InlineKeyboardMarkup,
+    InputMediaPhoto,
+    InputMediaVideo,
+    Message,
+)
 
 from wbb import app
 from wbb.core.decorators.errors import capture_err

+ 53 - 41
wbb/modules/spam.py

@@ -23,9 +23,11 @@ SOFTWARE.
 """
 from pyrogram import filters
 from pyrogram.types import (
-        Message, CallbackQuery,
-        InlineKeyboardMarkup, InlineKeyboardButton
-        )
+    Message,
+    CallbackQuery,
+    InlineKeyboardMarkup,
+    InlineKeyboardButton,
+)
 
 from wbb import app, arq, SUDOERS, LOG_GROUP_ID
 from wbb.core.decorators.errors import capture_err
@@ -54,10 +56,8 @@ __HELP__ = """
 
 
 @app.on_message(
-        (filters.text | filters.caption)
-        & ~filters.private
-        & ~filters.me,
-        group=spam_protection_group
+    (filters.text | filters.caption) & ~filters.private & ~filters.me,
+    group=spam_protection_group,
 )
 async def spam_protection_func(_, message: Message):
     text = message.text if message.text else message.caption
@@ -85,29 +85,31 @@ async def spam_protection_func(_, message: Message):
 **Action:** Alerted
 """
     keyboard = InlineKeyboardMarkup(
+        [
             [
-                [
-                    InlineKeyboardButton(
-                        text="Yes it's spam",
-                        callback_data="s_p_spam"
-                    )
-                ],
-                [
-                    InlineKeyboardButton(
-                        text="No, it's not spam",
-                        callback_data="s_p_ham",
-                    )
-                ]
-            ]
-        )
+                InlineKeyboardButton(
+                    text="Yes it's spam", callback_data="s_p_spam"
+                )
+            ],
+            [
+                InlineKeyboardButton(
+                    text="No, it's not spam",
+                    callback_data="s_p_ham",
+                )
+            ],
+        ]
+    )
     await message.reply_text(
-            text=text,
-            reply_markup=keyboard,
-            disable_web_page_preview=True,
-            )
+        text=text,
+        reply_markup=keyboard,
+        disable_web_page_preview=True,
+    )
+
 
-dev_forward = "If you're not a developer of WBB, forward this message to devs, " \
-                  + "so that they can use it to improve spam protection algorithm."
+dev_forward = (
+    "If you're not a developer of WBB, forward this message to devs, "
+    + "so that they can use it to improve spam protection algorithm."
+)
 
 
 @app.on_callback_query(filters.regex("s_p_"))
@@ -119,10 +121,10 @@ async def spam_p_callback(_, cq: CallbackQuery):
     permission = "can_delete_messages"
     if permission not in permissions:
         return await cq.answer(
-                "You don't have enough permissions to perform this action.\n"
-                + f"Permission needed: {permission}",
-                show_alert=True,
-                )
+            "You don't have enough permissions to perform this action.\n"
+            + f"Permission needed: {permission}",
+            show_alert=True,
+        )
 
     if cq.data.split("_")[-1] == "spam":
         try:
@@ -131,29 +133,39 @@ async def spam_p_callback(_, cq: CallbackQuery):
             await cq.message.delete()
             return
         text = cq.message.text.markdown
-        text = text.replace("Alerted", f"Deleted Message With {from_user.mention}'s Approval.")
+        text = text.replace(
+            "Alerted", f"Deleted Message With {from_user.mention}'s Approval."
+        )
         return await cq.message.edit(text)
-    
+
     await cq.message.delete()
     if cq.message.reply_to_message:
         text = f"**ADMINS OF {chat_id} FLAGGED THIS MESSAGE AS SPAM**\n\n"
         text += f"`{cq.message.reply_to_message.text.markdown}`\n\n__{dev_forward}__"
-        return await app.send_message(LOG_GROUP_ID, text, disable_web_page_preview=True)
+        return await app.send_message(
+            LOG_GROUP_ID, text, disable_web_page_preview=True
+        )
 
 
 @app.on_message(filters.command("spam") & ~filters.private)
 async def spam_flag_func(_, message: Message):
     if not message.reply_to_message:
-        return await message.reply_text("Reply to a message to flag it as spam")
-    
+        return await message.reply_text(
+            "Reply to a message to flag it as spam"
+        )
+
     r = message.reply_to_message
     if not r.text and not r.caption:
-        return await message.reply_text("Reply to a text message to flag it as spam")
+        return await message.reply_text(
+            "Reply to a text message to flag it as spam"
+        )
 
     text = r.text or r.caption
     if not text:
-        return await message.reply_text("Reply to a text message to flag it as spam")
-    
+        return await message.reply_text(
+            "Reply to a text message to flag it as spam"
+        )
+
     msg = f"""
 **ADMINS OF {message.chat.id} FLAGGED THIS MESSAGE AS SPAM**
 
@@ -164,6 +176,6 @@ async def spam_flag_func(_, message: Message):
 __{dev_forward}__
 """
     await message.reply_text(
-            "Message was flagged as spam, Devs will use this to improve spam protection algorithm."
-            )
+        "Message was flagged as spam, Devs will use it to improve spam protection algorithm."
+    )
     await app.send_message(LOG_GROUP_ID, msg, disable_web_page_preview=True)

+ 18 - 9
wbb/modules/stickers.py

@@ -26,19 +26,28 @@ import os
 from traceback import format_exc
 
 from pyrogram import filters
-from pyrogram.errors.exceptions.bad_request_400 import (PeerIdInvalid,
-                                                        ShortnameOccupyFailed,
-                                                        StickerPngDimensions,
-                                                        StickerPngNopng,
-                                                        UserIsBlocked)
+from pyrogram.errors.exceptions.bad_request_400 import (
+    PeerIdInvalid,
+    ShortnameOccupyFailed,
+    StickerPngDimensions,
+    StickerPngNopng,
+    UserIsBlocked,
+)
 from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup
 
 from wbb import BOT_USERNAME, app
 from wbb.core.decorators.errors import capture_err
-from wbb.utils.files import (get_document_from_file_id,
-                             resize_file_to_sticker_size, upload_document)
-from wbb.utils.stickerset import (add_sticker_to_set, create_sticker,
-                                  create_sticker_set, get_sticker_set_by_name)
+from wbb.utils.files import (
+    get_document_from_file_id,
+    resize_file_to_sticker_size,
+    upload_document,
+)
+from wbb.utils.stickerset import (
+    add_sticker_to_set,
+    create_sticker,
+    create_sticker_set,
+    get_sticker_set_by_name,
+)
 
 __MODULE__ = "Stickers"
 __HELP__ = """/sticker_id - To Get File ID of A Sticker.

+ 15 - 5
wbb/modules/sudoers.py

@@ -29,13 +29,23 @@ import time
 import psutil
 from pyrogram import filters
 
-from wbb import (BOT_ID, GBAN_LOG_GROUP_ID, SUDOERS, USERBOT_USERNAME, app,
-                 bot_start_time)
+from wbb import (
+    BOT_ID,
+    GBAN_LOG_GROUP_ID,
+    SUDOERS,
+    USERBOT_USERNAME,
+    app,
+    bot_start_time,
+)
 from wbb.core.decorators.errors import capture_err
 from wbb.utils import formatter
-from wbb.utils.dbfunctions import (add_gban_user, get_served_chats,
-                                   is_gbanned_user, remove_gban_user,
-                                   start_restart_stage)
+from wbb.utils.dbfunctions import (
+    add_gban_user,
+    get_served_chats,
+    is_gbanned_user,
+    remove_gban_user,
+    start_restart_stage,
+)
 
 __MODULE__ = "Sudoers"
 __HELP__ = """

+ 10 - 2
wbb/modules/taglogger.py

@@ -25,8 +25,16 @@ from pykeyboard import InlineKeyboard
 from pyrogram import filters
 from pyrogram.types import InlineKeyboardButton, Message
 
-from wbb import (BOT_ID, LOG_GROUP_ID, LOG_MENTIONS, USERBOT_ID, USERBOT_NAME,
-                 USERBOT_USERNAME, app, app2)
+from wbb import (
+    BOT_ID,
+    LOG_GROUP_ID,
+    LOG_MENTIONS,
+    USERBOT_ID,
+    USERBOT_NAME,
+    USERBOT_USERNAME,
+    app,
+    app2,
+)
 from wbb.core.decorators.errors import capture_err
 from wbb.utils.filter_groups import taglog_group
 

+ 8 - 2
wbb/modules/trust.py

@@ -24,8 +24,14 @@ SOFTWARE.
 from pyrogram import filters
 from pyrogram.types import Message
 
-from wbb import (BOT_ID, MESSAGE_DUMP_CHAT, USERBOT_BOT_CHAT_DIFFERENCE, app,
-                 app2, arq)
+from wbb import (
+    BOT_ID,
+    MESSAGE_DUMP_CHAT,
+    USERBOT_BOT_CHAT_DIFFERENCE,
+    app,
+    app2,
+    arq,
+)
 from wbb.utils.dbfunctions import get_trust_db, update_trust_db
 from wbb.utils.filter_groups import trust_group
 

+ 25 - 12
wbb/utils/inlinefuncs.py

@@ -34,13 +34,26 @@ from pykeyboard import InlineKeyboard
 from pyrogram import __version__ as pyrover
 from pyrogram import filters
 from pyrogram.raw.functions import Ping
-from pyrogram.types import (InlineKeyboardButton, InlineQueryResultArticle,
-                            InlineQueryResultPhoto, InputTextMessageContent)
+from pyrogram.types import (
+    InlineKeyboardButton,
+    InlineQueryResultArticle,
+    InlineQueryResultPhoto,
+    InputTextMessageContent,
+)
 from search_engine_parser import GoogleSearch
 
-from wbb import (BOT_USERNAME, MESSAGE_DUMP_CHAT, SUDOERS, USERBOT_ID,
-                 USERBOT_NAME, USERBOT_USERNAME, aiohttpsession, app, app2,
-                 arq)
+from wbb import (
+    BOT_USERNAME,
+    MESSAGE_DUMP_CHAT,
+    SUDOERS,
+    USERBOT_ID,
+    USERBOT_NAME,
+    USERBOT_USERNAME,
+    aiohttpsession,
+    app,
+    app2,
+    arq,
+)
 from wbb.core.types import InlineQueryResultCachedDocument
 from wbb.modules.info import get_chat_info, get_user_info
 from wbb.modules.music import download_youtube_audio
@@ -749,13 +762,13 @@ async def user_info_inline_func(answers, user):
         caption, _ = await get_user_info(user)
     except Exception:
         answers.append(
-                InlineQueryResultArticle(
-                    title="USER NOT FOUND",
-                    input_message_content=InputTextMessageContent(
-                        "USER NOT FOUND"
-                        )
-                    )
-                )
+            InlineQueryResultArticle(
+                title="USER NOT FOUND",
+                input_message_content=InputTextMessageContent(
+                    "USER NOT FOUND"
+                ),
+            )
+        )
         return answers
     answers.append(
         InlineQueryResultArticle(