mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-17 11:14:19 +00: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
|
|
|