Bjo53 commited on
Commit
b7e8773
·
verified ·
1 Parent(s): c0c5e77

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -1
app.py CHANGED
@@ -296,6 +296,8 @@ async def notify_boss_messages(bot: Bot):
296
 
297
 
298
  async def main():
 
 
299
  if not Config.BOT_TOKEN:
300
  raise RuntimeError("BOT_TOKEN is missing")
301
 
@@ -304,7 +306,12 @@ async def main():
304
  api=TelegramAPIServer.from_base(f"http://127.0.0.1:{BRIDGE_PORT}")
305
  )
306
 
307
- bot = Bot(token=Config.BOT_TOKEN, session=custom_session, parse_mode="HTML")
 
 
 
 
 
308
 
309
  scheduler.set_bot(bot)
310
  await scheduler.start()
 
296
 
297
 
298
  async def main():
299
+ from aiogram.client.default import DefaultBotProperties
300
+
301
  if not Config.BOT_TOKEN:
302
  raise RuntimeError("BOT_TOKEN is missing")
303
 
 
306
  api=TelegramAPIServer.from_base(f"http://127.0.0.1:{BRIDGE_PORT}")
307
  )
308
 
309
+ # ⚡️ THE FIX: aiogram 3.7.0+ syntax for parse_mode ⚡️
310
+ bot = Bot(
311
+ token=Config.BOT_TOKEN,
312
+ session=custom_session,
313
+ default=DefaultBotProperties(parse_mode="HTML")
314
+ )
315
 
316
  scheduler.set_bot(bot)
317
  await scheduler.start()