Skip to content
Open
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions squid/bot/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def __init__(self, func, **kwargs):
self.name: str = name

self.ignore_register = kwargs.get("ignore_register", False)

self.callback = func
self.enabled: bool = kwargs.get("enabled", True)

Expand Down Expand Up @@ -135,7 +135,7 @@ def __init__(self, func, **kwargs):
checks = kwargs.get("checks", [])

self.cog = kwargs.get("cog")

self.checks: List[Callable] = checks
self._commands: Dict[str, Type["SquidCommand"]] = {}

Expand Down
5 changes: 2 additions & 3 deletions squid/bot/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def plugin(self) -> "Optional[Type[PluginMeta]]":
@plugin.setter
def plugin(self, cog):
raise NotImplementedError

@property
def token(self) -> str:
return self._token
Expand All @@ -63,7 +63,7 @@ def guild(self):
def author(self):
if self.guild:
return Member(state=self.bot.state, guild=self.guild, data=self._user)
return User(state=self.bot.state, data=self._user['user'])
return User(state=self.bot.state, data=self._user["user"])

@utils.cached_property
def channel(self):
Expand Down Expand Up @@ -292,7 +292,6 @@ def plugin(self):
def plugin(self, cog):
if self.handler:
self.handler.cog = cog


def kwargs(self) -> dict:
return self.data.data
Expand Down