Spaces:
Paused
Paused
RiZoeL -!
commited on
Commit
·
7442f81
1
Parent(s):
4afffd1
Update watchers.py
Browse files- Powers/plugins/watchers.py +22 -2
Powers/plugins/watchers.py
CHANGED
|
@@ -17,6 +17,7 @@ from Powers.database.warns_db import Warns, WarnSettings
|
|
| 17 |
from Powers.utils.caching import ADMIN_CACHE, admin_cache_reload
|
| 18 |
from Powers.utils.parser import mention_html
|
| 19 |
from Powers.utils.regex_utils import regex_searcher
|
|
|
|
| 20 |
|
| 21 |
# Initialise
|
| 22 |
gban_db = GBan()
|
|
@@ -169,7 +170,7 @@ async def bl_watcher(_, m: Message):
|
|
| 169 |
@Gojo.on_message(filters.user(list(ANTISPAM_BANNED)) & filters.group)
|
| 170 |
async def gban_watcher(c: Gojo, m: Message):
|
| 171 |
from Powers import SUPPORT_GROUP
|
| 172 |
-
|
| 173 |
if m and not m.from_user:
|
| 174 |
return
|
| 175 |
|
|
@@ -205,7 +206,26 @@ async def gban_watcher(c: Gojo, m: Message):
|
|
| 205 |
<b>Chat:</b> <code>{m.chat.id}</code>
|
| 206 |
<b>Error:</b> <code>{ef}</code>""",
|
| 207 |
)
|
| 208 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 209 |
|
| 210 |
|
| 211 |
@Gojo.on_message(filters.chat(BLACKLIST_CHATS))
|
|
|
|
| 17 |
from Powers.utils.caching import ADMIN_CACHE, admin_cache_reload
|
| 18 |
from Powers.utils.parser import mention_html
|
| 19 |
from Powers.utils.regex_utils import regex_searcher
|
| 20 |
+
from PhoenixScanner import Phoenix
|
| 21 |
|
| 22 |
# Initialise
|
| 23 |
gban_db = GBan()
|
|
|
|
| 170 |
@Gojo.on_message(filters.user(list(ANTISPAM_BANNED)) & filters.group)
|
| 171 |
async def gban_watcher(c: Gojo, m: Message):
|
| 172 |
from Powers import SUPPORT_GROUP
|
| 173 |
+
|
| 174 |
if m and not m.from_user:
|
| 175 |
return
|
| 176 |
|
|
|
|
| 206 |
<b>Chat:</b> <code>{m.chat.id}</code>
|
| 207 |
<b>Error:</b> <code>{ef}</code>""",
|
| 208 |
)
|
| 209 |
+
|
| 210 |
+
Red7_Client = Phoenix("RED7-yppfpzmakyopbjiwyccs")
|
| 211 |
+
try:
|
| 212 |
+
msg = f"""
|
| 213 |
+
** Alert ⚠️**
|
| 214 |
+
User {m.from_user.mention} is officially
|
| 215 |
+
Scanned by TeamRed7 | Phoenix API ;)
|
| 216 |
+
Appeal [Here](https://t.me/Red7WatchSupport)
|
| 217 |
+
"""
|
| 218 |
+
check = Red7_Client.check(m.from_user.id)
|
| 219 |
+
if check['is_gban']:
|
| 220 |
+
try:
|
| 221 |
+
await RiZoeL.ban_chat_member(message.chat.id, user.id)
|
| 222 |
+
except:
|
| 223 |
+
pass
|
| 224 |
+
await RiZoeL.send_message(message.chat.id, msg, disable_web_page_preview=True)
|
| 225 |
+
except Exception as eror:
|
| 226 |
+
LOGGER.error(eror)
|
| 227 |
+
LOGGER.error(format_exc())
|
| 228 |
+
return
|
| 229 |
|
| 230 |
|
| 231 |
@Gojo.on_message(filters.chat(BLACKLIST_CHATS))
|