nothere990 commited on
Commit
3e26b63
·
1 Parent(s): 5d9d37f
Files changed (2) hide show
  1. bot/plugins/eval.py +1 -1
  2. bot/plugins/ping.py +7 -7
bot/plugins/eval.py CHANGED
@@ -53,7 +53,7 @@ async def aexec(code, client, message):
53
  + " import os\n"
54
  + " import wget\n"
55
  + " neo = message\n"
56
- + " message = event = neo = e\n"
57
  + " r = reply = message.reply_to_message\n"
58
  + " chat = message.chat.id\n"
59
  + " c = client\n"
 
53
  + " import os\n"
54
  + " import wget\n"
55
  + " neo = message\n"
56
+ + " e = message = event = neo\n"
57
  + " r = reply = message.reply_to_message\n"
58
  + " chat = message.chat.id\n"
59
  + " c = client\n"
bot/plugins/ping.py CHANGED
@@ -49,10 +49,10 @@ async def fetch_server_status():
49
  except Exception as e:
50
  return f"Error: {str(e)}"
51
 
52
- def get_caption(client, duration: float, uptime: str, is_premium: bool, server_status: str) -> str:
53
  """Generate the caption for the ping response."""
54
  if is_premium:
55
- return f"**Pong !!** `{duration}ms`\n**Uptime** - `{uptime}`\n**Server:** {server_status}"
56
  return (
57
  f"🏓 **Pɪɴɢᴇʀ :** `{duration}ms`\n"
58
  f"👨‍💻 **Sᴇʀᴠᴇʀ:** `{server_status}`"
@@ -60,9 +60,9 @@ def get_caption(client, duration: float, uptime: str, is_premium: bool, server_s
60
  f"🤴 **Oᴡɴᴇʀ :** {client.me.mention}"
61
  )
62
 
63
- async def send_ping_response(client, message: Message, duration: float, uptime: str, is_premium: bool, server_status: str, photo=None):
64
  """Send the ping response with optional photo."""
65
- caption = get_caption(duration, uptime, is_premium, server_status)
66
  if photo:
67
  await message.reply_photo(photo, caption=caption)
68
  else:
@@ -103,14 +103,14 @@ async def custom_ping_handler(client, message: Message):
103
  server_status = await fetch_server_status()
104
 
105
  if PING_DISABLE_NONPREM.get(message.from_user.id):
106
- await lol.edit_text(get_caption(client, duration, uptime, is_premium, server_status))
107
  return
108
 
109
  if is_anime:
110
  photo = waifu_random() if is_anime.get("anime") else waifu_hentai() if is_anime.get("hentai") else None
111
  if photo:
112
- await send_ping_response(client, message, duration, uptime, is_premium, server_status, photo)
113
  await lol.delete()
114
  return
115
 
116
- await send_ping_response(client, message, duration, uptime, is_premium, server_status)
 
49
  except Exception as e:
50
  return f"Error: {str(e)}"
51
 
52
+ def get_caption(client, duration: float, server_status: str, uptime: str, is_premium: bool) -> str:
53
  """Generate the caption for the ping response."""
54
  if is_premium:
55
+ return f"**Pong !!** `{duration}ms`\n**Server:** {server_status}\n**Uptime** - `{uptime}`\n"
56
  return (
57
  f"🏓 **Pɪɴɢᴇʀ :** `{duration}ms`\n"
58
  f"👨‍💻 **Sᴇʀᴠᴇʀ:** `{server_status}`"
 
60
  f"🤴 **Oᴡɴᴇʀ :** {client.me.mention}"
61
  )
62
 
63
+ async def send_ping_response(client, message: Message, duration: float, server_status: str, uptime: str, is_premium: bool, photo=None):
64
  """Send the ping response with optional photo."""
65
+ caption = get_caption(duration, server_status, uptime, is_premium)
66
  if photo:
67
  await message.reply_photo(photo, caption=caption)
68
  else:
 
103
  server_status = await fetch_server_status()
104
 
105
  if PING_DISABLE_NONPREM.get(message.from_user.id):
106
+ await lol.edit_text(get_caption(client, duration, server_status, uptime, is_premium))
107
  return
108
 
109
  if is_anime:
110
  photo = waifu_random() if is_anime.get("anime") else waifu_hentai() if is_anime.get("hentai") else None
111
  if photo:
112
+ await send_ping_response(client, message, duration, server_status, uptime, is_premium, photo)
113
  await lol.delete()
114
  return
115
 
116
+ await send_ping_response(client, message, duration, server_status, uptime, is_premium)