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

feat: package with nix and docker

This commit is contained in:
RGBCube 2025-04-11 21:20:48 +03:00
parent fb63e83312
commit b0b82aa689
Signed by: RGBCube
SSH key fingerprint: SHA256:CzqbPcfwt+GxFYNnFVCqoN5Itn4YFrshg1TrnACpA5M
8 changed files with 118 additions and 99 deletions

View file

@ -1,32 +1,27 @@
from __future__ import annotations
import asyncio
import json
from os import environ as env
from pathlib import Path
from . import MinearchyBot
async def main() -> None:
config = json.loads(
(
Path(__file__).parent / "config.json"
).read_text()
)
async def async_main() -> None:
env[f"JISHAKU_HIDE"] = "True"
env[f"JISHAKU_NO_UNDERSCORE"] = "True"
bot = MinearchyBot(
token = config["BOT_TOKEN"],
webhook_url = config["WEBHOOK_URL"]
token = env["MINEARCHY_BOT_TOKEN"],
webhook_url = env["MINEARCHY_BOT_WEBHOOK_URL"]
)
await bot.run()
if __name__ == "__main__":
def main() -> None:
try:
asyncio.run(main())
asyncio.run(async_main())
except KeyboardInterrupt:
pass
if __name__ == "__main__":
main()