()
| 333 | |
| 334 | |
| 335 | def _integrations_flow() -> None: |
| 336 | dispatch = { |
| 337 | "Setup Slack": lambda: _exec_script("setup_slack.py"), |
| 338 | "Setup Discord": lambda: _exec_script("setup_discord.py"), |
| 339 | "Listen on Slack": lambda: _exec_script( |
| 340 | "slack_listener.py", |
| 341 | *( |
| 342 | ["--with-dashboard"] |
| 343 | if inquirer.confirm("Enable live dashboard?", default=False).execute() |
| 344 | else [] |
| 345 | ), |
| 346 | ), |
| 347 | "Listen on Discord": lambda: _exec_script( |
| 348 | "discord_listener.py", |
| 349 | *( |
| 350 | ["--with-dashboard"] |
| 351 | if inquirer.confirm("Enable live dashboard?", default=False).execute() |
| 352 | else [] |
| 353 | ), |
| 354 | ), |
| 355 | } |
| 356 | |
| 357 | while True: |
| 358 | choice = inquirer.select( |
| 359 | "Integrations:", |
| 360 | choices=[*dispatch.keys(), "← Back"], |
| 361 | ).execute() |
| 362 | |
| 363 | if choice == "← Back" or choice is None: |
| 364 | break |
| 365 | dispatch[choice]() |
| 366 | |
| 367 | |
| 368 | def _vm_flow() -> None: |
no test coverage detected