TheHamkerCat 5 anni fa
parent
commit
7686181cd2
4 ha cambiato i file con 35 aggiunte e 23 eliminazioni
  1. 7 2
      wbb/modules/devs.py
  2. 3 0
      wbb/modules/greetings.py
  3. 18 21
      wbb/modules/regex.py
  4. 7 0
      wbb/modules/userbot.py

+ 7 - 2
wbb/modules/devs.py

@@ -1,3 +1,10 @@
+"""
+    CREDITS:
+        THIS MODULE IS COMPLETELY WRITTEN BY @Pokurt.
+        SOURCE:
+            https://github.com/pokurt/Nana-Remix/blob/master/nana/plugins/devs.py
+"""
+
 import sys
 import traceback
 from io import StringIO
@@ -13,8 +20,6 @@ __MODULE__ = "Devs"
 __HELP__ = "/eval - Execute Python Code\n/sh - Execute Shell Code"
 
 
-# Eval and Sh module from nana-remix
-
 async def aexec(code, client, message):
     exec(
         "async def __aexec(client, message): "

+ 3 - 0
wbb/modules/greetings.py

@@ -39,6 +39,9 @@ async def welcome(_, message: Message):
                 continue  # ignore sudos
             if await is_gbanned_user(member.id):
                 await message.chat.kick_member(member.id)
+                await message.reply_text(f"{member.mention} was globally banned, and got removed,"
+                                          + " if you think this is a false gban, you can appeal"
+                                          + " for this ban in support chat.")
                 continue
             if member.is_bot:
                 continue  # ignore bots

+ 18 - 21
wbb/modules/regex.py

@@ -77,30 +77,27 @@ def infinite_checker(repl):
 
 
 def separate_sed(sed_string):
-    try:
-        if (
-            len(sed_string) >= 3
-            and sed_string[1] in DELIMITERS
-            and sed_string.count(sed_string[1]) >= 2
-        ):
-            delim = sed_string[1]
-            start = counter = 2
-            while counter < len(sed_string):
-                if sed_string[counter] == "\\":
-                    counter += 1
-
-                elif sed_string[counter] == delim:
-                    replace = sed_string[start:counter]
-                    counter += 1
-                    start = counter
-                    break
+    if (
+        len(sed_string) >= 3
+        and sed_string[1] in DELIMITERS
+        and sed_string.count(sed_string[1]) >= 2
+    ):
+        delim = sed_string[1]
+        start = counter = 2
+        while counter < len(sed_string):
+            if sed_string[counter] == "\\":
+                counter += 1
 
+            elif sed_string[counter] == delim:
+                replace = sed_string[start:counter]
                 counter += 1
+                start = counter
+                break
 
-            else:
-                return None
-    except TypeError:
-        return
+            counter += 1
+
+        else:
+            return None
         while counter < len(sed_string):
             if (
                 sed_string[counter] == "\\"

+ 7 - 0
wbb/modules/userbot.py

@@ -1,3 +1,10 @@
+"""
+    CREDITS:
+        THIS MODULE IS WRITTEN BY @Pokurt.
+        SOURCE:
+            https://github.com/pokurt/Nana-Remix/blob/master/nana/plugins/devs.py
+"""
+
 import sys
 import traceback
 from io import StringIO