Archived
1
0
Fork 0
This commit is contained in:
多羅狼 2023-05-18 23:21:26 +08:00 committed by GitHub
parent e74691a590
commit ad1c50fa87
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 9 deletions

View file

@ -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"))

View file

@ -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": "更新失败。"
}