Update main.py
Browse files
main.py
CHANGED
@@ -173,7 +173,9 @@ async def get_download_media_file(file_id: str = None):
|
|
173 |
ALERT_WARN = """
|
174 |
π¨ Security Alert: API Key Activity Detected!
|
175 |
|
176 |
-
ποΈ
|
|
|
|
|
177 |
|
178 |
π API Key: <spoiler>{api_key}</spoiler>
|
179 |
|
@@ -190,20 +192,14 @@ async def _alert(_, cb):
|
|
190 |
await cb.answer(query, show_alert=True)
|
191 |
|
192 |
@fast_app.get("/user/tg/send_message")
|
193 |
-
async def user_send_message(user_id: int = None, api_key: str = None, text_log: str = None
|
194 |
try:
|
195 |
-
bttn = [
|
196 |
-
[
|
197 |
-
InlineKeyboardButton("ποΈ IP ADRS", callback_data=f"alert_{ips}"),
|
198 |
-
],
|
199 |
-
]
|
200 |
await bot.send_message(
|
201 |
user_id,
|
202 |
text=ALERT_WARN.format(
|
203 |
api_key=api_key,
|
204 |
text_log=text_log
|
205 |
-
)
|
206 |
-
reply_markup=btn
|
207 |
)
|
208 |
return {"status": True}
|
209 |
except Exception as e:
|
|
|
173 |
ALERT_WARN = """
|
174 |
π¨ Security Alert: API Key Activity Detected!
|
175 |
|
176 |
+
ποΈ Full Log:
|
177 |
+
|
178 |
+
`{text_log}`
|
179 |
|
180 |
π API Key: <spoiler>{api_key}</spoiler>
|
181 |
|
|
|
192 |
await cb.answer(query, show_alert=True)
|
193 |
|
194 |
@fast_app.get("/user/tg/send_message")
|
195 |
+
async def user_send_message(user_id: int = None, api_key: str = None, text_log: str = None):
|
196 |
try:
|
|
|
|
|
|
|
|
|
|
|
197 |
await bot.send_message(
|
198 |
user_id,
|
199 |
text=ALERT_WARN.format(
|
200 |
api_key=api_key,
|
201 |
text_log=text_log
|
202 |
+
)
|
|
|
203 |
)
|
204 |
return {"status": True}
|
205 |
except Exception as e:
|