Coverage for cmds/help.py: 92%
Shortcuts on this page
r m x toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
Shortcuts on this page
r m x toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1"""
2help.py
4contains chelp()
5"""
7from database import get
8import error
11async def chelp(*args):
12 """
13 chelp()
15 stands for command help
17 returns string for verb
18 """
20 # fix args
21 args = args[1:]
23 # check args
24 if len(args) > 1:
25 raise error.UnknownArgumentError
27 if args:
28 try:
29 string = '\n'.join(get("helps", args[0]))
30 except FileNotFoundError as err:
31 raise error.HelpNotFoundError from err
33 else:
34 string = '\n'.join(get("help"))
36 return f"```{string}```"