From 1661e225163006dfd5fdcce34c1e7d667e851809 Mon Sep 17 00:00:00 2001 From: LordOfPolls <22540825+LordOfPolls@users.noreply.github.com> Date: Fri, 20 May 2022 21:48:45 +0100 Subject: [PATCH] feat: Make `Extension.name` public (#494) --- naff/models/naff/extension.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/naff/models/naff/extension.py b/naff/models/naff/extension.py index 79383b6a4..8c3bb2044 100644 --- a/naff/models/naff/extension.py +++ b/naff/models/naff/extension.py @@ -44,7 +44,7 @@ async def some_command(self, context): """ bot: "Client" - __name: str + name: str extension_name: str description: str extension_checks: List @@ -58,7 +58,7 @@ async def some_command(self, context): def __new__(cls, bot: "Client", *args, **kwargs) -> "Extension": new_cls = super().__new__(cls) new_cls.bot = bot - new_cls.__name = cls.__name__ + new_cls.name = cls.__name__ new_cls.extension_checks = [] new_cls.extension_prerun = [] new_cls.extension_postrun = [] @@ -130,11 +130,6 @@ def listeners(self) -> List["Listener"]: """Get the listeners from this Extension.""" return self._listeners - @property - def name(self) -> str: - """Get the name of this Extension.""" - return self.__name - def drop(self) -> None: """Called when this Extension is being removed.""" for func in self._commands: