feat: rework __main__ (close #170)
This commit is contained in:
parent
8ff7a6bd70
commit
831665232c
3
divent/__main__.py
Normal file
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"
|
||||
|
Loading…
Reference in New Issue
Block a user