def _add_entries(self, commands):
"""
Adds commands from a dict to the paginator
:param commands: the dict with commands
"""
for name, command in commands:
# skip aliases
if name in command.aliases:
continue
if isinstance(command, Group):
self._expand_group(command, '')
continue
entry = '**{0}** - {1}'.format(name, command.short_doc)
shortened = self.shorten(entry)
self._paginator.add_line(shortened)
评论列表
文章目录