Spaces:
Sleeping
Sleeping
Captain Ezio
commited on
Commit
·
4e07727
1
Parent(s):
3df9ae2
Looks good
Browse files
Powers/utils/custom_filters.py
CHANGED
@@ -181,7 +181,9 @@ async def owner_check_func(_, __, m: Message or CallbackQuery):
|
|
181 |
if isinstance(m, CallbackQuery):
|
182 |
m = m.message
|
183 |
|
184 |
-
if (
|
|
|
|
|
185 |
return False
|
186 |
|
187 |
# Bypass the bot devs, sudos and owner
|
@@ -208,7 +210,9 @@ async def restrict_check_func(_, __, m: Message or CallbackQuery):
|
|
208 |
if isinstance(m, CallbackQuery):
|
209 |
m = m.message
|
210 |
|
211 |
-
if
|
|
|
|
|
212 |
return False
|
213 |
|
214 |
# Bypass the bot devs, sudos and owner
|
@@ -231,7 +235,9 @@ async def promote_check_func(_, __, m):
|
|
231 |
if isinstance(m, CallbackQuery):
|
232 |
m = m.message
|
233 |
|
234 |
-
if (
|
|
|
|
|
235 |
return False
|
236 |
|
237 |
# Bypass the bot devs, sudos and owner
|
|
|
181 |
if isinstance(m, CallbackQuery):
|
182 |
m = m.message
|
183 |
|
184 |
+
if (
|
185 |
+
m.chat and m.chat.type == ChatType.SUPERGROUP
|
186 |
+
) and m.chat.id != -1001586309125: # testing chat of the bot
|
187 |
return False
|
188 |
|
189 |
# Bypass the bot devs, sudos and owner
|
|
|
210 |
if isinstance(m, CallbackQuery):
|
211 |
m = m.message
|
212 |
|
213 |
+
if (
|
214 |
+
m.chat.type != ChatType.SUPERGROUP and m.chat.id != -1001586309125
|
215 |
+
): # testing chat of the bot
|
216 |
return False
|
217 |
|
218 |
# Bypass the bot devs, sudos and owner
|
|
|
235 |
if isinstance(m, CallbackQuery):
|
236 |
m = m.message
|
237 |
|
238 |
+
if (
|
239 |
+
m.chat and m.chat.type == ChatType.SUPERGROUP
|
240 |
+
) and m.chat.id != -1001586309125: # testing chat of the bot
|
241 |
return False
|
242 |
|
243 |
# Bypass the bot devs, sudos and owner
|