1
Fork 0
mirror of https://github.com/RGBCube/minearchy-bot synced 2025-07-27 08:57:46 +00:00

Fix poetry run

This commit is contained in:
RGBCube 2022-11-27 12:01:19 +03:00
parent fb8553c681
commit 6111101418
2 changed files with 10 additions and 8 deletions

View file

@ -8,14 +8,16 @@ from uvloop import install as install_uvloop
from . import MinearchyBot from . import MinearchyBot
install_uvloop()
with (Path(__file__).parent.parent / "config.json").open() as f: def main() -> None:
install_uvloop()
with (Path(__file__).parent.parent / "config.json").open() as f:
config = parse_json(f) config = parse_json(f)
for key in ("HIDE", "NO_UNDERSCORE"): for key in ("HIDE", "NO_UNDERSCORE"):
env[f"JISHAKU_{key}"] = "True" env[f"JISHAKU_{key}"] = "True"
bot = MinearchyBot(token=config["BOT_TOKEN"], webhook_url=config["WEBHOOK_URL"]) bot = MinearchyBot(token=config["BOT_TOKEN"], webhook_url=config["WEBHOOK_URL"])
bot.run() bot.run()

View file

@ -19,7 +19,7 @@ unimport = "*"
pyright = "*" pyright = "*"
[tool.poetry.scripts] [tool.poetry.scripts]
bot = "minearchy_bot.__main__:__main__" bot = "minearchy_bot.__main__:main"
[tool.black] [tool.black]
line-length = 100 line-length = 100