mirror of
https://github.com/RockChinQ/QChatGPT.git
synced 2024-11-16 19:57:04 +08:00
24 lines
703 B
Python
24 lines
703 B
Python
from .. import aamgr
|
||
|
||
|
||
@aamgr.AbstractCommandNode.register(
|
||
parent=None,
|
||
name="help",
|
||
description="显示自定义的帮助信息",
|
||
usage="!help",
|
||
aliases=[],
|
||
privilege=1
|
||
)
|
||
class HelpCommand(aamgr.AbstractCommandNode):
|
||
@classmethod
|
||
def process(cls, ctx: aamgr.Context) -> tuple[bool, list]:
|
||
import tips
|
||
reply = ["[bot] "+tips.help_message + "\n请输入 !cmd 查看命令列表"]
|
||
|
||
# 警告config.help_message过时
|
||
import config
|
||
if hasattr(config, "help_message"):
|
||
reply[0] += "\n\n警告:config.py中的help_message已过时,不再生效,请使用tips.py中的help_message替代"
|
||
|
||
return True, reply
|
||
|