Captain Ezio commited on
Commit
3d6e111
·
1 Parent(s): 055ffa0

minor fixes

Browse files
Powers/plugins/birthday.py CHANGED
@@ -28,6 +28,9 @@ async def remember_me(c: Gojo, m: Message):
28
  await m.reply_text("BDB_URI is not configured")
29
  return
30
  splited = m.text.split()
 
 
 
31
  if len(splited) != 2 and m.reply_to_message:
32
  await m.reply_text("**USAGE**:\n/remember [username or user id or reply to user] [DOB]\nDOB should be in format of dd/mm/yyyy\nYear is optional it is not necessary to pass it")
33
  return
 
28
  await m.reply_text("BDB_URI is not configured")
29
  return
30
  splited = m.text.split()
31
+ if len(splited) == 1:
32
+ await m.reply_text("**USAGE**:\n/remember [username or user id or reply to user] [DOB]\nDOB should be in format of dd/mm/yyyy\nYear is optional it is not necessary to pass it")
33
+ return
34
  if len(splited) != 2 and m.reply_to_message:
35
  await m.reply_text("**USAGE**:\n/remember [username or user id or reply to user] [DOB]\nDOB should be in format of dd/mm/yyyy\nYear is optional it is not necessary to pass it")
36
  return
Powers/plugins/web_con.py CHANGED
@@ -249,7 +249,11 @@ async def remove_background(c: Gojo, m: Message):
249
 
250
  @Gojo.on_message(command(["song","yta"]))
251
  async def song_down_up(c: Gojo, m: Message):
252
- splited = m.text.split(None,1)[1].strip()
 
 
 
 
253
  if splited.startswith("https://youtube.com"):
254
  is_direct = True
255
  query = splited
@@ -269,7 +273,11 @@ async def song_down_up(c: Gojo, m: Message):
269
 
270
  @Gojo.on_message(command(["vsong","ytv"]))
271
  async def video_down_up(c: Gojo, m: Message):
272
- splited = m.text.split(None,1)[1].strip()
 
 
 
 
273
  if splited.startswith("https://youtube.com"):
274
  is_direct = True
275
  query = splited
 
249
 
250
  @Gojo.on_message(command(["song","yta"]))
251
  async def song_down_up(c: Gojo, m: Message):
252
+ try:
253
+ splited = m.text.split(None,1)[1].strip()
254
+ except IndexError:
255
+ await m.reply_text("**USAGE**\n /song [song name | link]")
256
+ return
257
  if splited.startswith("https://youtube.com"):
258
  is_direct = True
259
  query = splited
 
273
 
274
  @Gojo.on_message(command(["vsong","ytv"]))
275
  async def video_down_up(c: Gojo, m: Message):
276
+ try:
277
+ splited = m.text.split(None,1)[1].strip()
278
+ except IndexError:
279
+ await m.reply_text("**USAGE**\n /vsong [song name | link]")
280
+ return
281
  if splited.startswith("https://youtube.com"):
282
  is_direct = True
283
  query = splited