Spaces:
Sleeping
Sleeping
Captain Ezio
commited on
Commit
·
14c8b0e
1
Parent(s):
bc65355
Looks good
Browse files- Powers/plugins/info.py +3 -3
- Powers/utils/caching.py +1 -1
Powers/plugins/info.py
CHANGED
@@ -15,7 +15,6 @@ from pyrogram.errors import (
|
|
15 |
RPCError, MessageTooLong, EntityBoundsInvalid, MediaCaptionTooLong)
|
16 |
|
17 |
|
18 |
-
|
19 |
gban_db = GBan()
|
20 |
|
21 |
|
@@ -54,7 +53,7 @@ async def count(c: Gojo, chat):
|
|
54 |
total_bot = (
|
55 |
total_admin
|
56 |
) = bot_admin = total_banned = "Can't fetch due to some error."
|
57 |
-
|
58 |
return total_bot, total_admin, bot_admin, total_banned
|
59 |
|
60 |
|
@@ -201,7 +200,7 @@ async def info_func(c: Gojo, message: Message):
|
|
201 |
|
202 |
try:
|
203 |
info_caption, photo_id = await user_info(c, user)
|
204 |
-
|
205 |
except Exception as e:
|
206 |
LOGGER.error(e)
|
207 |
LOGGER.error(format_exc())
|
@@ -237,6 +236,7 @@ async def info_func(c: Gojo, message: Message):
|
|
237 |
|
238 |
return
|
239 |
|
|
|
240 |
@Gojo.on_message(command(["chinfo", "chatinfo", "chat_info"]))
|
241 |
async def chat_info_func(c: Gojo, message: Message):
|
242 |
splited = message.text.split()
|
|
|
15 |
RPCError, MessageTooLong, EntityBoundsInvalid, MediaCaptionTooLong)
|
16 |
|
17 |
|
|
|
18 |
gban_db = GBan()
|
19 |
|
20 |
|
|
|
53 |
total_bot = (
|
54 |
total_admin
|
55 |
) = bot_admin = total_banned = "Can't fetch due to some error."
|
56 |
+
|
57 |
return total_bot, total_admin, bot_admin, total_banned
|
58 |
|
59 |
|
|
|
200 |
|
201 |
try:
|
202 |
info_caption, photo_id = await user_info(c, user)
|
203 |
+
|
204 |
except Exception as e:
|
205 |
LOGGER.error(e)
|
206 |
LOGGER.error(format_exc())
|
|
|
236 |
|
237 |
return
|
238 |
|
239 |
+
|
240 |
@Gojo.on_message(command(["chinfo", "chatinfo", "chat_info"]))
|
241 |
async def chat_info_func(c: Gojo, message: Message):
|
242 |
splited = message.text.split()
|
Powers/utils/caching.py
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
from typing import List
|
2 |
from Powers import LOGGER
|
3 |
-
from pyrogram.enums import ChatMembersFilter
|
4 |
from threading import RLock
|
5 |
from cachetools import TTLCache
|
6 |
from time import time, perf_counter
|
7 |
from pyrogram.types import CallbackQuery
|
|
|
8 |
from pyrogram.types.messages_and_media.message import Message
|
9 |
|
10 |
|
|
|
1 |
from typing import List
|
2 |
from Powers import LOGGER
|
|
|
3 |
from threading import RLock
|
4 |
from cachetools import TTLCache
|
5 |
from time import time, perf_counter
|
6 |
from pyrogram.types import CallbackQuery
|
7 |
+
from pyrogram.enums import ChatMembersFilter
|
8 |
from pyrogram.types.messages_and_media.message import Message
|
9 |
|
10 |
|