walkCommands method

  1. @override
Iterable<Command<CommandContext>> walkCommands()
override

Returns an iterable that recursively iterates over all the Commands in this group.

This will return all the Commands in this group, whether they be direct children or children of children. If you want all the direct Command children, consider using children.whereType<ICommand>() instead.

Implementation

@override
Iterable<Command> walkCommands() sync* {
  yield* _userCommands.values;
  yield* _messageCommands.values;

  for (final command in Set.of(_chatCommands.values)) {
    yield* command.walkCommands();
  }
}