feat(shard): 🎉 Initialize the rewrite.

This commit is contained in:
Nyeki.py
2024-11-13 02:09:47 -03:00
parent a7f64de5b4
commit d9d752c730
85 changed files with 1912 additions and 7626 deletions
+2 -23
View File
@@ -1,29 +1,8 @@
import os
from payphone import bot
from payphone.db import setup
from payphone.core import config, logging
bot = bot.bot
bot.shard_ids = [config.SHARD_ID]
bot.shard_count = config.SHARD_COUNT
from payphone.core import logging
logging.setup("Payphone")
async def init() -> None:
"""Initializes the DB."""
if config.SHARD_ID == 0:
os.system("aerich upgrade")
await setup.init()
bot.loop.run_until_complete(init())
bot.run(config.TOKEN)
bot.run()