소스 검색

some fixes

TheHamkerCat 5 년 전
부모
커밋
9b8892748e
4개의 변경된 파일과 7개의 추가작업 그리고 19개의 파일을 삭제
  1. 5 6
      README.md
  2. 1 1
      wbb/modules/chatbot.py
  3. 0 7
      wbb/modules/pmpermit.py
  4. 1 5
      wbb/utils/inlinefuncs.py

+ 5 - 6
README.md

@@ -26,8 +26,7 @@
 - Python >= 3.7
 - A [Telegram API key](https://docs.pyrogram.org/intro/setup#api-keys).
 - A [Telegram bot token](https://t.me/botfather).
-<!-- How to get MongoDB -->
-- A [MongoDB](https://telegra.ph/How-To-get-Mongodb-URI-04-06)
+- A [MongoDB URI](https://telegra.ph/How-To-get-Mongodb-URI-04-06)
 
 
 ## Install Locally Or On A VPS
@@ -67,14 +66,14 @@ $ python3 str_gen.py
 ## Features 
 
 * Group Management
-* Userbot
+* Userbot [Including Ai PM PERMIT]
 * Music Downloading 
 * AI Chatbot
-* Web Scraping 
-* Get Pictures/Wallpapers  
+* Web Scraping
+* Get Pictures/Wallpapers
 * Dictionary
 * Translation
-* Message Cryptography 
+* Message Cryptography
 * Python Interpreter (Right In Your Telegram Chat!)
 * Nekobin (Paste Code/Text)
 * And Much More...

+ 1 - 1
wbb/modules/chatbot.py

@@ -111,7 +111,7 @@ async def chatbot_status_ubot(_, message):
 
     elif status == "OFF" or status == "off" or status == "Off":
         if chat_id in active_chats_ubot:
-            active_chats_bot.remove(chat_id)
+            active_chats_ubot.remove(chat_id)
             await message.edit("Chatbot Disabled!")
             return
         await message.edit("ChatBot Is Already Disabled.")

+ 0 - 7
wbb/modules/pmpermit.py

@@ -25,7 +25,6 @@ SOFTWARE.
 from wbb import app, app2, BOT_ID, USERBOT_ID, SUDOERS
 from pyrogram import filters
 from wbb.utils.dbfunctions import is_pmpermit_approved, approve_pmpermit, disapprove_pmpermit
-from wbb.modules.chatbot import active_chats_ubot
 import asyncio
 
 flood = {}
@@ -115,7 +114,6 @@ async def unblock_user_func(_, message):
 
 @app.on_callback_query(filters.regex("pmpermit"))
 async def pmpermit_cq(_, cq):
-    global active_chats_ubot
     user_id = cq.from_user.id
     data, victim = cq.data.split(None, 2)[1], int(cq.data.split(None, 2)[2])
 
@@ -139,8 +137,3 @@ async def pmpermit_cq(_, cq):
 
     elif data == "approve_me":
         await app2.send_message(user_id, "I'm busy right now, will approve you shortly, DO NOT SPAM.")
-
-    elif data == "chitchats":
-        await approve_pmpermit(user_id)
-        active_chats_ubot.append(user_id)
-        await app2.send_message(user_id, "Hello")

+ 1 - 5
wbb/utils/inlinefuncs.py

@@ -753,7 +753,7 @@ async def pmpermit_func(answers, user_id, victim):
     if user_id != USERBOT_ID:
         return
     caption = f"Hi, I'm {USERBOT_NAME}, What are you here for?, You'll be blocked if you send more than 5 messages."
-    buttons = InlineKeyboard(row_width=3)
+    buttons = InlineKeyboard(row_width=2)
     buttons.add(
             InlineKeyboardButton(
                 text="To Scam You",
@@ -763,10 +763,6 @@ async def pmpermit_func(answers, user_id, victim):
                 text="For promotion",
                 callback_data="pmpermit to_scam_you"
                 ),
-            InlineKeyboardButton(
-                text="ChitChats",
-                callback_data="pmpermit chitchats"
-                ),
             InlineKeyboardButton(
                 text="Approve me",
                 callback_data="pmpermit approve_me"