feat: rework __main__ (close )

This commit is contained in:
Michel Roux 2024-01-24 12:25:33 +01:00
parent 8ff7a6bd70
commit 831665232c
3 changed files with 5 additions and 2 deletions

3
divent/__main__.py Normal file

@ -0,0 +1,3 @@
from divent.bot import run
run()

@ -342,6 +342,6 @@ async def ical(entity_id: str):
return redirect(url_for(".login"))
def __main__():
def run():
client.loop.create_task(client.start(DISCORD_TOKEN))
app.run("0.0.0.0", loop=client.loop)

@ -9,7 +9,7 @@ homepage = "https://divent.crystalyx.net/"
repository = "https://git.crystalyx.net/Xefir/Divent"
[tool.poetry.scripts]
divent = 'divent.bot:__main__'
divent = 'divent.bot:run'
[tool.poetry.dependencies]
python = ">=3.8.1,<3.12"