Skip to content
This repository has been archived by the owner on Mar 13, 2023. It is now read-only.

Commit

Permalink
feat: Make Extension.name public (#494)
Browse files Browse the repository at this point in the history
  • Loading branch information
LordOfPolls authored May 20, 2022
1 parent 44b4bac commit 1661e22
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions naff/models/naff/extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ async def some_command(self, context):
"""

bot: "Client"
__name: str
name: str
extension_name: str
description: str
extension_checks: List
Expand All @@ -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 = []
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 1661e22

Please sign in to comment.