From 4bc2b3c97964e2dedc7e55f5f37980eb5c04e1ce Mon Sep 17 00:00:00 2001 From: Richard Chien Date: Sat, 23 Jun 2018 22:45:43 +0800 Subject: [PATCH] Update --- none/command.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/none/command.py b/none/command.py index 809df42e..7b3a618e 100644 --- a/none/command.py +++ b/none/command.py @@ -27,9 +27,7 @@ class Command: self.func = func self.permission = permission - async def run(self, bot, ctx, session, - *args, **kwargs) -> Any: - # TODO: check permission + async def run(self, bot, ctx, session) -> Any: permission = 0 if ctx['user_id'] in bot.config.SUPERUSERS: permission |= perm.IS_SUPERUSER @@ -69,7 +67,7 @@ def _find_command(name: Tuple[str]) -> Optional[Command]: cmd_tree = _registry for part in name[:-1]: if part not in cmd_tree: - return False + return None cmd_tree = cmd_tree[part] return cmd_tree.get(name[-1])