diff --git a/pyproject.toml b/pyproject.toml index 0797498..7b313de 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ license = "AGPL-3.0-or-later" readme = "README.md" [tool.poetry.scripts] -vetting-bot = "vetting_bot:main" +vetting-bot = "vetting_bot.main:run" [tool.poetry.dependencies] python = "^3.11" diff --git a/vetting_bot/main.py b/vetting_bot/main.py index 9ee0570..4d63053 100644 --- a/vetting_bot/main.py +++ b/vetting_bot/main.py @@ -131,5 +131,6 @@ async def main(): await client.close() -# Run the main function in an asyncio event loop -asyncio.get_event_loop().run_until_complete(main()) +def run(): + # Run the main function in an asyncio event loop + asyncio.get_event_loop().run_until_complete(main())