Update
This commit is contained in:
parent
dfd8329708
commit
ea3de3990b
4 changed files with 28 additions and 0 deletions
|
@ -17,6 +17,7 @@
|
|||
"core.help.module.enable": "Enable single/multiple module(s).",
|
||||
"core.help.module.enable_all": "Enable all modules.",
|
||||
"core.help.module.help": "View help list.",
|
||||
"core.help.module.help.legacy": "View help list. (Legacy)",
|
||||
"core.help.module.help.detail": "View details of a module.",
|
||||
"core.help.module.list": "View all available modules.",
|
||||
"core.help.module.load": "Load single/multiple module(s)",
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
"core.help.module.enable": "开启一个/多个模块。",
|
||||
"core.help.module.enable_all": "开启所有模块。",
|
||||
"core.help.module.help": "查看帮助列表。",
|
||||
"core.help.module.help.legacy": "查看帮助列表。(旧版)",
|
||||
"core.help.module.help.detail": "查看一个模块的详细信息。",
|
||||
"core.help.module.list": "查看所有可用模块。",
|
||||
"core.help.module.load": "加载一个/多个模块。",
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
"core.help.module.enable": "啟用一個/多個模組。",
|
||||
"core.help.module.enable_all": "啟用所有模組。",
|
||||
"core.help.module.help": "檢視說明列表。",
|
||||
"core.help.module.help.legacy": "檢視說明列表。(舊版)",
|
||||
"core.help.module.help.detail": "檢視一個模組的詳細資訊。",
|
||||
"core.help.module.list": "檢視所有可用模組。",
|
||||
"core.help.module.load": "載入一個/多個模組。",
|
||||
|
|
|
@ -452,6 +452,31 @@ async def _(msg: Bot.MessageSession):
|
|||
await msg.finish('\n'.join(help_msg))
|
||||
|
||||
|
||||
@hlp.command('legacy {{core.help.module.help.legacy}}')
|
||||
async def _(msg: Bot.MessageSession):
|
||||
module_list = ModulesManager.return_modules_list(
|
||||
target_from=msg.target.target_from)
|
||||
target_enabled_list = msg.enabled_modules
|
||||
help_msg = [msg.locale.t("core.message.module.help.legacy.base")]
|
||||
essential = []
|
||||
for x in module_list:
|
||||
if module_list[x].base:
|
||||
essential.append(module_list[x].bind_prefix)
|
||||
help_msg.append(' | '.join(essential))
|
||||
help_msg.append(msg.locale.t("core.message.module.help.legacy.external"))
|
||||
module_ = []
|
||||
for x in module_list:
|
||||
if x in target_enabled_list:
|
||||
module_.append(x)
|
||||
help_msg.append(' | '.join(module_))
|
||||
help_msg.append(
|
||||
msg.locale.t(
|
||||
"core.message.module.help.legacy.more_information",
|
||||
prefix=msg.prefixes[0],
|
||||
help_url=Config('help_url')))
|
||||
await msg.finish('\n'.join(help_msg))
|
||||
|
||||
|
||||
async def modules_help(msg: Bot.MessageSession):
|
||||
module_list = ModulesManager.return_modules_list(
|
||||
target_from=msg.target.target_from)
|
||||
|
|
Reference in a new issue