diff --git a/src/goob_ai/aio_settings.py b/src/goob_ai/aio_settings.py index 877a1852..4ae2f600 100644 --- a/src/goob_ai/aio_settings.py +++ b/src/goob_ai/aio_settings.py @@ -117,7 +117,7 @@ class AioSettings(BaseSettings): token: str = "" prefix: str = "/" - discord_admin_user_id: str = "" + discord_admin_user_id: int | None = None discord_general_channel: int = 908894727779258390 diff --git a/src/goob_ai/cli.py b/src/goob_ai/cli.py index fba9e2d8..bba82cd6 100644 --- a/src/goob_ai/cli.py +++ b/src/goob_ai/cli.py @@ -113,6 +113,12 @@ def version_callback(version: bool) -> None: raise typer.Exit() +@APP.command() +def version() -> None: + """version command""" + rich.print(f"goob_ai version: {goob_ai.__version__}") + + @APP.command() def about() -> None: """about command""" @@ -220,7 +226,7 @@ async def run_bot(): @APP.command() def go() -> None: - """Main entry point for goobbot""" + """Main entry point for GoobAI""" typer.echo("Starting up GoobAI Bot") asyncio.run(run_bot()) diff --git a/tests/test_cli.py b/tests/test_cli.py index 39b5d5ec..5c9a16f5 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -13,7 +13,7 @@ class TestApp: def test_version(self) -> None: """Test the version command.""" - result = runner.invoke(APP, ["--version"]) + result = runner.invoke(APP, ["version"]) assert result.exit_code == 0 assert "goob_ai version:" in result.stdout @@ -21,8 +21,9 @@ def test_help(self) -> None: """Test the help command.""" result = runner.invoke(APP, ["--help"]) assert result.exit_code == 0 - assert "goob_ai: A Python package for the Transport for London (TFL) API." in result.stdout - + assert "about command" in result.stdout + assert "Main entry point for GoobAI" in result.stdout + assert "version command" in result.stdout def test_about(self) -> None: """Test the help command."""