diff --git a/modules/phigros/__init__.py b/modules/phigros/__init__.py index 1eb1d1b2..aa0d8fea 100644 --- a/modules/phigros/__init__.py +++ b/modules/phigros/__init__.py @@ -63,12 +63,12 @@ async def _(msg: Bot.MessageSession): update_assets_ = await update_assets() update_difficulty_csv_ = await update_difficulty_csv() - if update_assets_ or update_difficulty_csv_: - await msg.finish(msg.locale.t("phigros.message.update.success")) - - -@phi.command('update rating', required_superuser=True) -async def _(msg: Bot.MessageSession): - update_ = await update_difficulty_csv() - if update_: + if update_assets_ and update_difficulty_csv_: await msg.finish(msg.locale.t("phigros.message.update.success")) + else: + if not update_assets_ and not update_difficulty_csv_: + await msg.finish(msg.locale.t("phigros.message.update.failed")) + elif not update_assets_: + await msg.finish("assets " + msg.locale.t("phigros.message.update.failed")) + elif not update_difficulty_csv_: + await msg.finish("difficulty_csv " + msg.locale.t("phigros.message.update.failed")) diff --git a/modules/phigros/locales/zh_cn.json b/modules/phigros/locales/zh_cn.json index 84c50c03..2fabe752 100644 --- a/modules/phigros/locales/zh_cn.json +++ b/modules/phigros/locales/zh_cn.json @@ -7,5 +7,6 @@ "phigros.unbind.message.success": "解绑成功。", "phigros.b19.help": "查询 B19 列表。", "phigros.message.user_unbound": "未绑定用户,请使用「${prefix}phigros bind」绑定一个用户。", - "phigros.message.update.success": "更新成功。" + "phigros.message.update.success": "更新成功。", + "phigros.message.update.failed": "更新失败。" } \ No newline at end of file