Spaces:
Sleeping
Sleeping
Merge pull request #84 from Gojo-Bots/beta
Browse files- Powers/plugins/watchers.py +22 -2
- requirements.txt +1 -0
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 c.ban_chat_member(m.chat.id, user.id)
|
222 |
+
await c.send_message(m.chat.id, msg, disable_web_page_preview=True)
|
223 |
+
except Exception as a:
|
224 |
+
LOGGER.error(a)
|
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))
|
requirements.txt
CHANGED
@@ -31,3 +31,4 @@ typing-extensions==4.3.0; python_full_version >= "3.6.2" and python_version >= "
|
|
31 |
ujson==5.7.0; python_version >= "3.7"
|
32 |
urllib3==1.26.11; python_version >= "3.7" and python_full_version < "3.0.0" and python_version < "4" or python_full_version >= "3.6.0" and python_version < "4" and python_version >= "3.7"
|
33 |
wikipedia==1.4.0
|
|
|
|
31 |
ujson==5.7.0; python_version >= "3.7"
|
32 |
urllib3==1.26.11; python_version >= "3.7" and python_full_version < "3.0.0" and python_version < "4" or python_full_version >= "3.6.0" and python_version < "4" and python_version >= "3.7"
|
33 |
wikipedia==1.4.0
|
34 |
+
PhoenixScanner
|