MatteoScript commited on
Commit
c1e8dc2
·
verified ·
1 Parent(s): 30533c3

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +4 -7
main.py CHANGED
@@ -20,13 +20,10 @@ app.add_middleware(
20
 
21
  @app.on_event("startup")
22
  async def on_startup():
23
- try:
24
- response = await client.get(os.getenv('telegramUrlBot') + '/setWebhook?url=https://matteoscript-TelegramBotSimple.hf.space/OLD')
25
- response = await client.get(os.getenv('telegramUrlBot') + '/setWebhook?url=https://matteoscript-TelegramBotSimple.hf.space/')
26
- response.raise_for_status()
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):