Skip to content

Commit

Permalink
fix: 无命令前缀时help命令报错问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Cassius0924 committed Mar 9, 2024
1 parent 1b026bd commit a962361
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion wechatter/commands/_commands/help.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ def get_help_msg() -> str:
continue
cmd_msg = ""
for key in value["keys"]:
cmd_msg += config["command_prefix"] + key + "\n"
if config.get("command_prefix"):
cmd_msg += config["command_prefix"] + key + "\n"
else:
cmd_msg += key + "\n"
help_msg += cmd_msg + "-->「" + value["desc"] + "」\n\n"
return help_msg

0 comments on commit a962361

Please sign in to comment.