Captain Ezio commited on
Commit
b4e692e
·
1 Parent(s): a4bcf94

Update utils.py

Browse files
Files changed (1) hide show
  1. Powers/plugins/utils.py +3 -6
Powers/plugins/utils.py CHANGED
@@ -8,7 +8,7 @@ from aiohttp import ClientSession
8
  from tswift import Song
9
  from wikipedia import summary
10
  from wikipedia.exceptions import DisambiguationError, PageError
11
-
12
 
13
  from gpytranslate import Translator
14
  from pyrogram import filters
@@ -32,7 +32,6 @@ gban_db = GBan()
32
 
33
  @Gojo.on_message(command("wiki"))
34
  async def wiki(_, m: Message):
35
- LOGGER.info(f"{m.from_user.id} used wiki cmd in {m.chat.id}")
36
 
37
  if len(m.text.split()) <= 1:
38
  return await m.reply_text(text="Please check help on how to use this this command.")
@@ -98,7 +97,6 @@ async def get_lyrics(_, m: Message):
98
  return
99
 
100
  query = m.text.split(None, 1)[1]
101
- LOGGER.info(f"{m.from_user.id} used lyrics cmd in {m.chat.id}")
102
  song = ""
103
  if not query:
104
  await m.edit_text(text="You haven't specified which song to look for!")
@@ -130,7 +128,6 @@ async def get_lyrics(_, m: Message):
130
  command("id") & (filters.group | filters.private),
131
  )
132
  async def id_info(c: Gojo, m: Message):
133
- LOGGER.info(f"{m.from_user.id} used id cmd in {m.chat.id}")
134
 
135
  if m.chat.type == "supergroup" and not m.reply_to_message:
136
  await m.reply_text(text=f"This Group's ID is <code>{m.chat.id}</code>")
@@ -216,6 +213,8 @@ async def github(_, message):
216
  await message.reply_text(result, disable_web_page_preview=True)
217
  except Exception as e:
218
  await message.reply_text(str(e))
 
 
219
 
220
  #paste here
221
  session = ClientSession()
@@ -329,8 +328,6 @@ _DISABLE_CMDS_ = [
329
  "lyrics",
330
  "tr",
331
  "github",
332
- "git",
333
- "info",
334
  ]
335
  __alt_name__ = ["util", "misc", "tools"]
336
 
 
8
  from tswift import Song
9
  from wikipedia import summary
10
  from wikipedia.exceptions import DisambiguationError, PageError
11
+ from trackback import format_exc
12
 
13
  from gpytranslate import Translator
14
  from pyrogram import filters
 
32
 
33
  @Gojo.on_message(command("wiki"))
34
  async def wiki(_, m: Message):
 
35
 
36
  if len(m.text.split()) <= 1:
37
  return await m.reply_text(text="Please check help on how to use this this command.")
 
97
  return
98
 
99
  query = m.text.split(None, 1)[1]
 
100
  song = ""
101
  if not query:
102
  await m.edit_text(text="You haven't specified which song to look for!")
 
128
  command("id") & (filters.group | filters.private),
129
  )
130
  async def id_info(c: Gojo, m: Message):
 
131
 
132
  if m.chat.type == "supergroup" and not m.reply_to_message:
133
  await m.reply_text(text=f"This Group's ID is <code>{m.chat.id}</code>")
 
213
  await message.reply_text(result, disable_web_page_preview=True)
214
  except Exception as e:
215
  await message.reply_text(str(e))
216
+ LOGGER.error(e)
217
+ LOGGER.error(format_exc())
218
 
219
  #paste here
220
  session = ClientSession()
 
328
  "lyrics",
329
  "tr",
330
  "github",
 
 
331
  ]
332
  __alt_name__ = ["util", "misc", "tools"]
333