Captain Ezio commited on
Commit
cbec4fb
·
1 Parent(s): c1d601a

Looks good

Browse files
Powers/plugins/admin.py CHANGED
@@ -6,12 +6,11 @@ from Powers.vars import Config
6
  from traceback import format_exc
7
  from Powers.bot_class import Gojo
8
  from pyrogram.types import Message
9
- from pyrogram.enums import ChatType
10
  from Powers.utils.parser import mention_html
11
  from Powers.database.approve_db import Approve
12
  from Powers.database.reporting_db import Reporting
13
  from Powers.utils.extract_user import extract_user
14
- from pyrogram.enums import ChatMemberStatus as CMS
15
  from Powers import LOGGER, OWNER_ID, DEV_USERS, SUPPORT_GROUP, SUPPORT_STAFF
16
  from Powers.utils.caching import (
17
  ADMIN_CACHE, TEMP_ADMIN_CACHE_BLOCK, admin_cache_reload)
@@ -112,7 +111,7 @@ async def zombie_clean(c: Gojo, m: Message):
112
  @Gojo.on_message(command("admincache"))
113
  async def reload_admins(_, m: Message):
114
  global TEMP_ADMIN_CACHE_BLOCK
115
-
116
  if m.chat.type != ChatType.SUPERGROUP:
117
  return await m.reply_text(
118
  "This command is made to be used in groups only!",
 
6
  from traceback import format_exc
7
  from Powers.bot_class import Gojo
8
  from pyrogram.types import Message
 
9
  from Powers.utils.parser import mention_html
10
  from Powers.database.approve_db import Approve
11
  from Powers.database.reporting_db import Reporting
12
  from Powers.utils.extract_user import extract_user
13
+ from pyrogram.enums import ChatType, ChatMemberStatus as CMS
14
  from Powers import LOGGER, OWNER_ID, DEV_USERS, SUPPORT_GROUP, SUPPORT_STAFF
15
  from Powers.utils.caching import (
16
  ADMIN_CACHE, TEMP_ADMIN_CACHE_BLOCK, admin_cache_reload)
 
111
  @Gojo.on_message(command("admincache"))
112
  async def reload_admins(_, m: Message):
113
  global TEMP_ADMIN_CACHE_BLOCK
114
+
115
  if m.chat.type != ChatType.SUPERGROUP:
116
  return await m.reply_text(
117
  "This command is made to be used in groups only!",
Powers/plugins/greetings.py CHANGED
@@ -21,6 +21,7 @@ gdb = GBan()
21
 
22
  ChatType = enums.ChatType
23
 
 
24
  async def escape_mentions_using_curly_brackets_wl(
25
  m: ChatMemberUpdated,
26
  n: bool,
 
21
 
22
  ChatType = enums.ChatType
23
 
24
+
25
  async def escape_mentions_using_curly_brackets_wl(
26
  m: ChatMemberUpdated,
27
  n: bool,
Powers/plugins/info.py CHANGED
@@ -160,7 +160,7 @@ async def chat_info(c: Gojo, chat, already=False):
160
 
161
  if chat.type == ChatType.BOT:
162
  type_ = "bot"
163
-
164
  is_scam = chat.is_scam
165
  is_fake = chat.is_fake
166
  description = chat.description
 
160
 
161
  if chat.type == ChatType.BOT:
162
  type_ = "bot"
163
+
164
  is_scam = chat.is_scam
165
  is_fake = chat.is_fake
166
  description = chat.description
Powers/plugins/report.py CHANGED
@@ -7,8 +7,8 @@ from Powers import LOGGER, SUPPORT_STAFF
7
  from Powers.utils.parser import mention_html
8
  from pyrogram.types import Message, CallbackQuery
9
  from Powers.database.reporting_db import Reporting
10
- from pyrogram.enums import ChatMembersFilter as cmf, ChatType
11
  from Powers.utils.custom_filters import command, admin_filter
 
12
 
13
 
14
  @Gojo.on_message(
 
7
  from Powers.utils.parser import mention_html
8
  from pyrogram.types import Message, CallbackQuery
9
  from Powers.database.reporting_db import Reporting
 
10
  from Powers.utils.custom_filters import command, admin_filter
11
+ from pyrogram.enums import ChatType, ChatMembersFilter as cmf
12
 
13
 
14
  @Gojo.on_message(
Powers/plugins/start.py CHANGED
@@ -7,7 +7,7 @@ from Powers import LOGGER, HELP_COMMANDS
7
  from Powers.utils.extras import StartPic
8
  from Powers.utils.custom_filters import command
9
  from pyrogram.types import Message, CallbackQuery
10
- from pyrogram.enums import ChatMemberStatus as CMS, ChatType
11
  from pyrogram.errors import UserIsBlocked, QueryIdInvalid, MessageNotModified
12
  from Powers.utils.start_utils import (
13
  gen_cmds_kb, gen_start_kb, get_help_msg, get_private_note,
 
7
  from Powers.utils.extras import StartPic
8
  from Powers.utils.custom_filters import command
9
  from pyrogram.types import Message, CallbackQuery
10
+ from pyrogram.enums import ChatType, ChatMemberStatus as CMS
11
  from pyrogram.errors import UserIsBlocked, QueryIdInvalid, MessageNotModified
12
  from Powers.utils.start_utils import (
13
  gen_cmds_kb, gen_start_kb, get_help_msg, get_private_note,
Powers/plugins/utils.py CHANGED
@@ -8,10 +8,10 @@ from wikipedia import summary
8
  from Powers.bot_class import Gojo
9
  from gpytranslate import Translator
10
  from pyrogram import enums, filters
 
11
  from Powers.utils.http_helper import *
12
  from Powers.database.users_db import Users
13
  from pyrogram.errors import MessageTooLong
14
- from pyrogram.enums import ChatType
15
  from Powers.utils.custom_filters import command
16
  from Powers.utils.clean_file import remove_markdown_and_html
17
  from wikipedia.exceptions import PageError, DisambiguationError
 
8
  from Powers.bot_class import Gojo
9
  from gpytranslate import Translator
10
  from pyrogram import enums, filters
11
+ from pyrogram.enums import ChatType
12
  from Powers.utils.http_helper import *
13
  from Powers.database.users_db import Users
14
  from pyrogram.errors import MessageTooLong
 
15
  from Powers.utils.custom_filters import command
16
  from Powers.utils.clean_file import remove_markdown_and_html
17
  from wikipedia.exceptions import PageError, DisambiguationError
Powers/utils/custom_filters.py CHANGED
@@ -6,8 +6,8 @@ from re import escape, compile as compile_re
6
  from Powers.database.disable_db import Disabling
7
  from pyrogram.types import Message, CallbackQuery
8
  from Powers import OWNER_ID, DEV_USERS, SUDO_USERS
9
- from pyrogram.enums import ChatMemberStatus as CMS, ChatType
10
  from pyrogram.errors import RPCError, UserNotParticipant
 
11
  from Powers.utils.caching import ADMIN_CACHE, admin_cache_reload
12
 
13
 
@@ -146,7 +146,6 @@ async def admin_check_func(_, __, m: Message or CallbackQuery):
146
  if isinstance(m, CallbackQuery):
147
  m = m.message
148
 
149
-
150
  if m.chat.type != ChatType.SUPERGROUP:
151
  return False
152
 
@@ -209,7 +208,6 @@ async def restrict_check_func(_, __, m: Message or CallbackQuery):
209
  if isinstance(m, CallbackQuery):
210
  m = m.message
211
 
212
-
213
  if m.chat.type != ChatType.SUPERGROUP:
214
  return False
215
 
@@ -256,7 +254,6 @@ async def changeinfo_check_func(_, __, m):
256
  if isinstance(m, CallbackQuery):
257
  m = m.message
258
 
259
-
260
  if m.chat.type != ChatType.SUPERGROUP:
261
  await m.reply_text("This command is made to be used in groups not in pm!")
262
  return False
 
6
  from Powers.database.disable_db import Disabling
7
  from pyrogram.types import Message, CallbackQuery
8
  from Powers import OWNER_ID, DEV_USERS, SUDO_USERS
 
9
  from pyrogram.errors import RPCError, UserNotParticipant
10
+ from pyrogram.enums import ChatType, ChatMemberStatus as CMS
11
  from Powers.utils.caching import ADMIN_CACHE, admin_cache_reload
12
 
13
 
 
146
  if isinstance(m, CallbackQuery):
147
  m = m.message
148
 
 
149
  if m.chat.type != ChatType.SUPERGROUP:
150
  return False
151
 
 
208
  if isinstance(m, CallbackQuery):
209
  m = m.message
210
 
 
211
  if m.chat.type != ChatType.SUPERGROUP:
212
  return False
213
 
 
254
  if isinstance(m, CallbackQuery):
255
  m = m.message
256
 
 
257
  if m.chat.type != ChatType.SUPERGROUP:
258
  await m.reply_text("This command is made to be used in groups not in pm!")
259
  return False
Powers/utils/string.py CHANGED
@@ -1,8 +1,8 @@
1
  from time import time
2
  from html import escape
3
  from typing import List
4
- from re import compile as compile_re
5
  from pyrogram.enums import ChatType
 
6
  from Powers.utils.parser import escape_markdown
7
  from pyrogram.types import Message, InlineKeyboardButton
8
 
 
1
  from time import time
2
  from html import escape
3
  from typing import List
 
4
  from pyrogram.enums import ChatType
5
+ from re import compile as compile_re
6
  from Powers.utils.parser import escape_markdown
7
  from pyrogram.types import Message, InlineKeyboardButton
8