Archived
1
0
Fork 0

Update maimai_best_50.py

This commit is contained in:
多羅狼 2023-08-20 02:55:09 +08:00 committed by GitHub
parent 3272020fe1
commit f9c16e9a76
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -400,8 +400,10 @@ async def generate(msg, payload) -> Tuple[Optional[Image.Image], bool]:
status_code=200,
headers={'Content-Type': 'application/json', 'accept': '*/*'}, fmt='json')
except ValueError as e:
if str(e).startswith('400'):
await msg.finish(msg.locale.t("maimai.message.user_not_found"))
if "qq" in payload and msg.target.targetFrom in ['QQ', 'QQ|Group', 'QQ|Guild']:
await msg.finish(msg.locale.t("maimai.message.user_unbound"))
else:
await msg.finish(msg.locale.t("maimai.message.user_not_found"))
if str(e).startswith('403'):
await msg.finish(msg.locale.t("maimai.message.forbidden"))
else: