Captain Ezio commited on
Commit
5c9c39e
·
2 Parent(s): 2657b6b 25eb353

Merge branch 'main' of https://github.com/Gojo-Bots/Gojo_Satarou

Browse files
Files changed (2) hide show
  1. Powers/plugins/info.py +4 -8
  2. requirements.txt +5 -5
Powers/plugins/info.py CHANGED
@@ -195,7 +195,6 @@ async def info_func(c: Gojo, message: Message):
195
 
196
  try:
197
  info_caption, photo_id = await user_info(c, user=user)
198
- photo_id = str(photo_id)
199
  LOGGER.info(
200
  f"{message.from_user.id} tried to fetch user info of user {message.from_user.id} in {message.chat.id}"
201
  )
@@ -227,19 +226,16 @@ async def chat_info_func(c: Gojo, message: Message):
227
  chat = splited[1]
228
 
229
  try:
230
- user_found = int(user_found)
231
- except (ValueError, Exception) as ef:
232
- if "invalid literal for int() with base 10:" in str(ef):
233
- user_found = str(user_found)
234
- else:
235
- return await message.reply_text(f"Got and exception {e}\n**Usage:**/chinfo [USERNAME|ID]")
236
 
237
  m = await message.reply_text(
238
  f"Fetching chat info of chat **{message.chat.title}**....."
239
  )
240
 
241
  info_caption, photo_id = await chat_info(c, chat=chat)
242
- photo_id = str(photo_id)
243
  if not photo_id:
244
  return await m.edit(info_caption, disable_web_page_preview=True)
245
 
 
195
 
196
  try:
197
  info_caption, photo_id = await user_info(c, user=user)
 
198
  LOGGER.info(
199
  f"{message.from_user.id} tried to fetch user info of user {message.from_user.id} in {message.chat.id}"
200
  )
 
226
  chat = splited[1]
227
 
228
  try:
229
+ if chat.isnumeric():
230
+ chat = int(chat)
231
+ except Exception as e:
232
+ return await message.reply_text(f"Got and exception {e}\n**Usage:**/chinfo [USERNAME|ID]")
 
 
233
 
234
  m = await message.reply_text(
235
  f"Fetching chat info of chat **{message.chat.title}**....."
236
  )
237
 
238
  info_caption, photo_id = await chat_info(c, chat=chat)
 
239
  if not photo_id:
240
  return await m.edit(info_caption, disable_web_page_preview=True)
241
 
requirements.txt CHANGED
@@ -1,8 +1,8 @@
1
- aiofiles==0.8.0; python_full_version >= "3.7"
2
  aiohttp==3.7.4; python_version >= "3.6" and python_version < "4.0"
3
  anyio==3.6.1; python_full_version >= "3.6.2" and python_version >= "3.6"
4
  asyncio==3.4.3
5
- beautifulsoup4==4.9.1; python_full_version >= "3.6"
6
  cachetools==5.2.0; python_version >= "3.7" and python_version < "4.0"
7
  certifi==2022.6.15; python_version >= "3.7" and python_version < "4"
8
  charset-normalizer==2.1.0; python_version >= "3.7" and python_version < "4" and python_full_version >= "3.6.0"
@@ -18,19 +18,19 @@ prettyconf==2.2.1
18
  pyaes==1.6.1; python_version >= "3.6" and python_version < "4.0"
19
  pykeyboard==0.1.5
20
  pymongo==3.12.3
21
- pyrogram==2.0.24; python_version >= "3.8"
22
  pysocks==1.7.1; python_version >= "3.7" and python_full_version < "3.0.0" and python_version < "4.0" or python_version >= "3.7" and python_version < "4.0" and python_full_version >= "3.4.0"
23
  python-dateutil==2.8.2; (python_version >= "2.7" and python_full_version < "3.0.0") or (python_full_version >= "3.3.0")
24
  pyyaml==6.0; python_version >= "3.6"
25
  regex==2022.7.25; python_version >= "3.6"
26
  requests==2.28.1; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.6.0"
27
- rfc3986==1.5.0; python_version >= "3.6"
28
  six==1.16.0; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.3.0"
29
  sniffio==1.3.0; python_full_version >= "3.6.2" and python_version >= "3.7"
30
  soupsieve==2.3.2.post1; python_version >= "3.6" and python_full_version >= "3.6.0"
31
  tgcrypto==1.2.3; python_version >= "3.6" and python_version < "4.0"
32
  tswift==0.7.0
33
  typing-extensions==4.3.0; python_full_version >= "3.6.2" and python_version >= "3.7" and python_version < "3.8"
34
- ujson==5.4.0; python_version >= "3.7"
35
  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"
36
  wikipedia==1.4.0
 
1
+ aiofiles==22.1.0; python_full_version >= "3.7"
2
  aiohttp==3.7.4; python_version >= "3.6" and python_version < "4.0"
3
  anyio==3.6.1; python_full_version >= "3.6.2" and python_version >= "3.6"
4
  asyncio==3.4.3
5
+ beautifulsoup4==4.11.1; python_full_version >= "3.6"
6
  cachetools==5.2.0; python_version >= "3.7" and python_version < "4.0"
7
  certifi==2022.6.15; python_version >= "3.7" and python_version < "4"
8
  charset-normalizer==2.1.0; python_version >= "3.7" and python_version < "4" and python_full_version >= "3.6.0"
 
18
  pyaes==1.6.1; python_version >= "3.6" and python_version < "4.0"
19
  pykeyboard==0.1.5
20
  pymongo==3.12.3
21
+ pyrogram==2.0.57; python_version >= "3.8"
22
  pysocks==1.7.1; python_version >= "3.7" and python_full_version < "3.0.0" and python_version < "4.0" or python_version >= "3.7" and python_version < "4.0" and python_full_version >= "3.4.0"
23
  python-dateutil==2.8.2; (python_version >= "2.7" and python_full_version < "3.0.0") or (python_full_version >= "3.3.0")
24
  pyyaml==6.0; python_version >= "3.6"
25
  regex==2022.7.25; python_version >= "3.6"
26
  requests==2.28.1; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.6.0"
27
+ rfc3986==2.0.0; python_version >= "3.6"
28
  six==1.16.0; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.3.0"
29
  sniffio==1.3.0; python_full_version >= "3.6.2" and python_version >= "3.7"
30
  soupsieve==2.3.2.post1; python_version >= "3.6" and python_full_version >= "3.6.0"
31
  tgcrypto==1.2.3; python_version >= "3.6" and python_version < "4.0"
32
  tswift==0.7.0
33
  typing-extensions==4.3.0; python_full_version >= "3.6.2" and python_version >= "3.7" and python_version < "3.8"
34
+ ujson==5.5.0; python_version >= "3.7"
35
  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"
36
  wikipedia==1.4.0