Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 17 additions & 3 deletions interactions/models/internal/extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ async def some_command(self, context):

"""

bot: "Client"
_bot: "Client"
name: str
extension_name: str
description: str
Expand Down Expand Up @@ -77,8 +77,6 @@ class Metadata:
def __new__(cls, bot: "Client", *args, **kwargs) -> "Extension":
instance = super().__new__(cls)
instance.bot = bot
instance.client = bot

instance.name = cls.__name__

if instance.name in bot.ext:
Expand Down Expand Up @@ -140,6 +138,22 @@ def __new__(cls, bot: "Client", *args, **kwargs) -> "Extension":
def __name__(self) -> str:
return self.name

@property
def bot(self) -> "Client":
return self._bot

@bot.setter
def bot(self, value: "Client") -> None:
self._bot = value

@property
def client(self) -> "Client":
return self._bot

@client.setter
def client(self, value: "Client") -> None:
self._bot = value

@property
def commands(self) -> List["BaseCommand"]:
"""Get the commands from this Extension."""
Expand Down
Loading