feat: rework __main__ (close #170)
divent / docker (push) Has been skipped Details
divent / pypi (push) Has been skipped Details
divent / lint (push) Failing after 1m42s Details

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
View File

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

View File

@ -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)

View File

@ -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"