Skip to content

Commit

Permalink
Fix walk_commands behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
tandemdude committed Jan 6, 2021
1 parent d559b6a commit 7762eb8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lightbulb/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -601,10 +601,10 @@ def walk_commands(self) -> typing.Generator[Command, None, None]:
"""
for command in self.subcommands:
yield command
if isinstance(command, type(self)):
if isinstance(command, Group):
yield from command.walk_commands()

def add_check(self, check_func: typing.Callable[[context.Context], typing.Coroutine[None, None, bool]]) -> None:
def add_check(self, check_func: typing.Callable[[context_.Context], typing.Coroutine[None, None, bool]]) -> None:
if self.inherit_checks:
for c in self.subcommands:
c.add_check(check_func)
Expand Down

0 comments on commit 7762eb8

Please sign in to comment.