Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
|
@@ -20,13 +20,10 @@ app.add_middleware(
|
|
| 20 |
|
| 21 |
@app.on_event("startup")
|
| 22 |
async def on_startup():
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
print("Webhook set successfully")
|
| 28 |
-
except httpx.HTTPError as e:
|
| 29 |
-
print(f"Error setting webhook: {e}")
|
| 30 |
|
| 31 |
@app.post("/")
|
| 32 |
async def RispondiMessaggio(data: dict):
|
|
|
|
| 20 |
|
| 21 |
@app.on_event("startup")
|
| 22 |
async def on_startup():
|
| 23 |
+
print('start up')
|
| 24 |
+
response = client.get(os.getenv('telegramUrlBot') + '/setWebhook?url=https://matteoscript-TelegramBotSimple.hf.space/OLD')
|
| 25 |
+
response = client.get(os.getenv('telegramUrlBot') + '/setWebhook?url=https://matteoscript-TelegramBotSimple.hf.space/')
|
| 26 |
+
print('webhook settato')
|
|
|
|
|
|
|
|
|
|
| 27 |
|
| 28 |
@app.post("/")
|
| 29 |
async def RispondiMessaggio(data: dict):
|