randydev commited on
Commit
54ef781
Β·
verified Β·
1 Parent(s): 92b5cba

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +10 -8
main.py CHANGED
@@ -105,13 +105,15 @@ async def upload_to_catbox(dl_path: str) -> str:
105
  response.raise_for_status()
106
  return (await response.text()).strip()
107
 
 
108
  @fast_app.on_event("startup")
109
  async def startup_event():
110
- user = await bot.start()
111
- userbot = await user_client.start()
112
  LOGS.info(f"Started Bot: {user.me.first_name}")
113
  LOGS.info(f"Started UserBot: {userbot.me.first_name}")
114
-
 
115
  @fast_app.get("/user/status/ban")
116
  async def user_status_ban(username: str = None):
117
  username_ch = "RendyProjects"
@@ -179,6 +181,7 @@ async def get_download_media_file(file_id: str = None):
179
  return {
180
  "download": base64_image,
181
  }
 
182
 
183
  ALERT_WARN = """
184
  🚨 Security Alert: API Key Activity Detected!
@@ -200,11 +203,7 @@ Your current API key has expired. To continue using premium features, please upg
200
  πŸ”— Need help? Contact support: @xpushz
201
  """
202
 
203
- @bot.on_callback_query(filters.regex("^alert_"))
204
- async def _alert(_, cb):
205
- query = cb.data.split("_", 1)
206
- await cb.answer(query, show_alert=True)
207
-
208
  @fast_app.get("/user/tg/notifications")
209
  async def user_send_notif(user_id: int = None, api_key: str = None):
210
  try:
@@ -331,6 +330,7 @@ async def log_captcha(data: dict):
331
  log_message = f"βœ… CAPTCHA Verified\nπŸ–₯ IP: `{user_ip}`\n⏳ Time: `{timestamp}`"
332
  await send_to_telegram(text=log_message)
333
  return {"status": "logged"}
 
334
 
335
  @fast_app.get("/api/twitter")
336
  async def twitter_downloader(link: str):
@@ -349,6 +349,7 @@ async def twitter_downloader(link: str):
349
  )
350
  return {"results": response}
351
 
 
352
  @fast_app.get("/user/get_user")
353
  async def get_user(user_id=None):
354
  try:
@@ -390,6 +391,7 @@ async def get_user(user_id=None):
390
  },
391
  "creation_date": response
392
  }
 
393
 
394
  js.custom_openapi(
395
  app=fast_app,
 
105
  response.raise_for_status()
106
  return (await response.text()).strip()
107
 
108
+ """"
109
  @fast_app.on_event("startup")
110
  async def startup_event():
111
+ # user = await bot.start()
112
+ # userbot = await user_client.start()
113
  LOGS.info(f"Started Bot: {user.me.first_name}")
114
  LOGS.info(f"Started UserBot: {userbot.me.first_name}")
115
+
116
+
117
  @fast_app.get("/user/status/ban")
118
  async def user_status_ban(username: str = None):
119
  username_ch = "RendyProjects"
 
181
  return {
182
  "download": base64_image,
183
  }
184
+ """
185
 
186
  ALERT_WARN = """
187
  🚨 Security Alert: API Key Activity Detected!
 
203
  πŸ”— Need help? Contact support: @xpushz
204
  """
205
 
206
+ """
 
 
 
 
207
  @fast_app.get("/user/tg/notifications")
208
  async def user_send_notif(user_id: int = None, api_key: str = None):
209
  try:
 
330
  log_message = f"βœ… CAPTCHA Verified\nπŸ–₯ IP: `{user_ip}`\n⏳ Time: `{timestamp}`"
331
  await send_to_telegram(text=log_message)
332
  return {"status": "logged"}
333
+ """
334
 
335
  @fast_app.get("/api/twitter")
336
  async def twitter_downloader(link: str):
 
349
  )
350
  return {"results": response}
351
 
352
+ """
353
  @fast_app.get("/user/get_user")
354
  async def get_user(user_id=None):
355
  try:
 
391
  },
392
  "creation_date": response
393
  }
394
+ """
395
 
396
  js.custom_openapi(
397
  app=fast_app,