nonebot-plugin-help
nonebot-plugin-help copied to clipboard
Matcher没有__help_name__ 和__help_info__的时候可以用command信息替换
if not name:
checkers = matcher.rule.checkers
temp = []
for v in checkers:
if hasattr(v.call, "cmds"):
cmds = v.call.cmds
if len(cmds) > 0:
if not name:
name = cmds[0]
for x in cmds:
temp.append(x)
help_info = ",".join('%s' % x for x in temp)
效果如下
Hi @leinlin, thanks for the issue.
I'm keeping help doc of matcher level as "only show as provided" to enable ability of hidden command.
I believe this is useful in some cases and can avoid duplicates as most plugin providers who are using nonebot-plugin-help are putting all their help doc in PluginMetadata
now instead of using combined (part in plugin level, detail in matcher level) help menu.
Let's leave the issue here for future consideration.