11import sys
22from asyncio import get_event_loop
3+
4+ # from functools import partial
35from importlib import import_module
46from importlib .util import resolve_name
57from logging import Logger , StreamHandler , basicConfig , getLogger
@@ -604,9 +606,9 @@ async def raw_guild_create(self, guild) -> dict:
604606
605607# class CoolCode(interactions.Extension):
606608# def __init__(self, client):
607- # ...
609+ # self.client = client
608610
609- # @self.client. command(
611+ # @command(
610612# type=interactions.ApplicationCommandType.USER,
611613# name="User command in cog",
612614# )
@@ -618,6 +620,15 @@ async def raw_guild_create(self, guild) -> dict:
618620# """
619621
620622# client: Client
623+ # commands: Optional[List[ApplicationCommand]]
624+ # listeners: Optional[List[Listener]]
621625
622626# def __new__(cls, bot: Client) -> None:
623627# cls.client = bot
628+ # cls.commands = []
629+
630+ # for _, content in cls.__dict__.items():
631+ # content = content if isinstance(content.callback, partial) else None
632+ # if isinstance(content, ApplicationCommand):
633+ # cls.commands.append(content)
634+ # bot.command(**content)
0 commit comments