Initial Template Commit

This commit is contained in:
2026-07-22 17:43:19 +03:00
commit d3dc9c09e3
11 changed files with 132 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
from typing import TYPE_CHECKING
from .. import logger
if TYPE_CHECKING:
from meta.bot import Bot
async def setup(bot: "Bot"):
from .component import AwesomeComponent
await bot.add_component(AwesomeComponent(bot))
+33
View File
@@ -0,0 +1,33 @@
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 -----