Files
2026-07-22 17:57:18 +03:00

34 lines
754 B
Python

from typing import Optional
import asyncio
import twitchio
from twitchio.ext import commands as cmds
from meta import Bot
from meta.logger import log_wrap
from utils.lib import utc_now
from . import logger
from ..data import AwesomeData
from ..awesome import AwesomeRegistry
class AwesomeComponent(cmds.Component):
def __init__(self, bot: Bot):
self.bot = bot
self.data = bot.dbconn.load_registry(AwesomeData())
self.awesome = AwesomeRegistry(self.data)
# ----- API -----
async def component_load(self):
await self.data.init()
await self.bot.version_check(*self.data.VERSION)
await self.profiles.init()
async def component_teardown(self):
pass
# ------ Commands -----