79816946

Date: 2025-11-11 17:21:56
Score: 1.5
Natty:
Report link

# Source - https://stackoverflow.com/q

# Posted by TheFlappy

# Retrieved 2025-11-11, License - CC BY-SA 4.0

async def on_startup(bot: Bot) -> None:

await bot.set_webhook(f"{BASE_WEBHOOK_URL}{WEBHOOK_PATH}")

def main():

bot = Bot(TOKEN, parse_mode='HTML')

dp = Dispatcher()

dp.startup.register(on_startup)

app = web.Application()

webhook_requests_handler = SimpleRequestHandler(

    dispatcher=dp,

    bot=bot

)

webhook_requests_handler.register(app, path=WEBHOOK_PATH)

setup_application(app, dp, bot=bot)

web.run_app(app, host=WEB_SERVER_HOST, port=WEB_SERVER_PORT)

if _name_ == "_main_":

main()
Reasons:
  • Blacklisted phrase (1): stackoverflow
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: Mohamed Abdulle