Initial commit

This commit is contained in:
HoloTech
2025-09-01 20:26:45 +10:00
commit 1f60610947
19 changed files with 1293 additions and 0 deletions
+42
View File
@@ -0,0 +1,42 @@
import asyncio
import logging
import websockets
from twitchio.web import AiohttpAdapter
from meta import Bot, conf, setup_main_logger, args
from data import Database
from modules import twitch_setup
logger = logging.getLogger(__name__)
async def main():
db = Database(conf.data['args'])
async with db.open():
adapter = AiohttpAdapter(
host=conf.bot.get('wshost', None),
port=conf.bot.getint('wsport', None),
domain=conf.bot.get('wsdomain', None),
eventsub_secret=conf.bot.get('eventsub_secret', None)
)
bot = Bot(
config=conf,
dbconn=db,
adapter=adapter,
setup=twitch_setup,
)
try:
await bot.start()
finally:
await bot.close()
def _main():
setup_main_logger()
asyncio.run(main())