diff --git a/modules/core/locales/en_us.json b/modules/core/locales/en_us.json index 2668947c..caa60439 100644 --- a/modules/core/locales/en_us.json +++ b/modules/core/locales/en_us.json @@ -12,7 +12,6 @@ "core.help.leave": "Let the robot leave the group.", "core.help.locale": "View the language for robots.", "core.help.locale.set": "Set the language for robots.", - "core.help.locale.reload": "重载机器人语言文件", "core.help.module.disable": "Disable single/multiple modules.", "core.help.module.disable_all": "Disable all modules.", "core.help.module.enable": "Enable single/multiple module(s).", diff --git a/modules/core/locales/zh_cn.json b/modules/core/locales/zh_cn.json index 23f98248..28cd7978 100644 --- a/modules/core/locales/zh_cn.json +++ b/modules/core/locales/zh_cn.json @@ -12,7 +12,6 @@ "core.help.leave": "使机器人离开群组。", "core.help.locale": "查看机器人运行语言。", "core.help.locale.set": "设置机器人运行语言。", - "core.help.locale.reload": "重载机器人语言文件。", "core.help.module.disable": "关闭一个/多个模块。", "core.help.module.disable_all": "关闭所有模块。", "core.help.module.enable": "开启一个/多个模块。", diff --git a/modules/core/locales/zh_tw.json b/modules/core/locales/zh_tw.json index 3f786586..2a453467 100644 --- a/modules/core/locales/zh_tw.json +++ b/modules/core/locales/zh_tw.json @@ -12,7 +12,6 @@ "core.help.leave": "使機器人離開群組。", "core.help.locale": "檢視機器人使用的語言。", "core.help.locale.set": "設定機器人使用的語言。", - "core.help.locale.reload": "重新加載機器人語言檔案。", "core.help.module.disable": "停用一個/多個模組。", "core.help.module.disable_all": "停用所有模組。", "core.help.module.enable": "啟用一個/多個模組。", diff --git a/modules/core/utils.py b/modules/core/utils.py index 1cbb4cab..0ad8d142 100644 --- a/modules/core/utils.py +++ b/modules/core/utils.py @@ -147,7 +147,7 @@ async def config_gu(msg: Bot.MessageSession): await msg.finish(msg.locale.t("core.message.locale.set.invalid", langlist=avaliable_lang)) -@locale.handle('reload {{core.help.locale.reload}}', required_superuser=True) +@locale.handle('reload', required_superuser=True) async def reload_locale(msg: Bot.MessageSession): err = load_locale_file() if len(err) == 0: diff --git a/modules/cytoid/__init__.py b/modules/cytoid/__init__.py index 19b29e61..a860b591 100644 --- a/modules/cytoid/__init__.py +++ b/modules/cytoid/__init__.py @@ -7,7 +7,7 @@ from .profile import cytoid_profile from .rating import get_rating from .utils import get_profile_name -cytoid = module('cytoid', +cytoid = module('cytoid', desc='{cytoid.help.desc}', developers=['OasisAkari'], alias='ctd') diff --git a/modules/cytoid/locales/zh_cn.json b/modules/cytoid/locales/zh_cn.json index 4567633f..417ee870 100644 --- a/modules/cytoid/locales/zh_cn.json +++ b/modules/cytoid/locales/zh_cn.json @@ -1,6 +1,7 @@ { "cytoid.help.b30": "查询 Cytoid 用户的 B30/R30 列表。", "cytoid.help.bind": "绑定 Cytoid 用户。", + "cytoid.help.desc": "查询 Cytoid 相关内容。", "cytoid.help.profile": "查询一个用户的基本信息。", "cytoid.help.unbind": "解绑用户。", "cytoid.message.b30.cooldown": "距离上次执行已过去 ${time} 秒,本命令的冷却时间为 150 秒。(据官方人员所述,此 API 的调用十分昂贵,故手动做出此限制,请谅解。)", diff --git a/modules/meme/__init__.py b/modules/meme/__init__.py index f572cea5..b400eecd 100644 --- a/modules/meme/__init__.py +++ b/modules/meme/__init__.py @@ -15,7 +15,7 @@ meme = module( support_languages=['zh_cn', 'en_us']) -@meme.handle(help_doc=' {{meme.help}}') +@meme.handle(' {{meme.help}}') async def _(msg: Bot.MessageSession, term: str): # res_jiki = await jiki(msg.parsed_msg[''], msg.locale) # R.I.P. jikipedia diff --git a/modules/mkey/__init__.py b/modules/mkey/__init__.py index fea2ede6..b3f883a6 100644 --- a/modules/mkey/__init__.py +++ b/modules/mkey/__init__.py @@ -2,7 +2,7 @@ from core.component import module from core.builtins import Bot from .generator import get_mkey -mk = module('mkey', desc='{mkey.desc}', developers=['OasisAkari', 'Kurisu']) +mk = module('mkey', desc='{mkey.help.desc}', developers=['OasisAkari', 'Kurisu']) @mk.handle(' []') diff --git a/modules/mkey/locales/zh_cn.json b/modules/mkey/locales/zh_cn.json index d5777703..dbbc8a52 100644 --- a/modules/mkey/locales/zh_cn.json +++ b/modules/mkey/locales/zh_cn.json @@ -1,9 +1,9 @@ { - "mkey.desc": "计算任天堂系列主机的家长控制重置密码。", + "mkey.help.desc": "计算任天堂系列主机的家长控制重置密码。", "mkey.message.error.date.month": "无效的月份。", "mkey.message.error.date.day": "无效的日期。", "mkey.message.error.inquiry_num": "无效的询问码。", "mkey.message.error.device": "无效的主机。", - "mkey.message.error.hal": "Switch需要指定主机ID。", + "mkey.message.error.hal": "Switch 需要指定主机 ID。", "mkey.message.result": "您的重置密码是:${result}。" } diff --git a/modules/whois/__init__.py b/modules/whois/__init__.py index 363102f9..8ab5b0b2 100644 --- a/modules/whois/__init__.py +++ b/modules/whois/__init__.py @@ -19,11 +19,10 @@ def get_value(dict, key): return None -w = module('whois', desc='{whois.help.desc}', - developers=['DoroWolf']) +w = module('whois', developers=['DoroWolf']) -@w.handle('') +@w.handle(' {{whois.help}}') async def _(msg: Bot.MessageSession, domain: str): res = await get_whois(msg, domain) output = await msg.finish(res) diff --git a/modules/whois/locales/en_us.json b/modules/whois/locales/en_us.json index c276aa12..619b6966 100644 --- a/modules/whois/locales/en_us.json +++ b/modules/whois/locales/en_us.json @@ -1,5 +1,5 @@ { - "whois.help.desc": "查询 WHOIS 信息。", + "whois.help": "查询 WHOIS 信息。", "whois.message.creation_date": "注册日期:", "whois.message.dnssec": "DNSSEC:", "whois.message.domain_name": "域名名称:", diff --git a/modules/whois/locales/zh_cn.json b/modules/whois/locales/zh_cn.json index c276aa12..619b6966 100644 --- a/modules/whois/locales/zh_cn.json +++ b/modules/whois/locales/zh_cn.json @@ -1,5 +1,5 @@ { - "whois.help.desc": "查询 WHOIS 信息。", + "whois.help": "查询 WHOIS 信息。", "whois.message.creation_date": "注册日期:", "whois.message.dnssec": "DNSSEC:", "whois.message.domain_name": "域名名称:", diff --git a/modules/whois/locales/zh_tw.json b/modules/whois/locales/zh_tw.json index d3330804..267c3181 100644 --- a/modules/whois/locales/zh_tw.json +++ b/modules/whois/locales/zh_tw.json @@ -1,5 +1,5 @@ { - "whois.help.desc": "查詢 WHOIS 資訊。", + "whois.help": "查詢 WHOIS 資訊。", "whois.message.creation_date": "註冊日期:", "whois.message.dnssec": "DNSSEC:", "whois.message.domain_name": "網域名稱:",