🔭 修复 profile 简易报错错误、优化翻译
This commit is contained in:
parent
ada8cb1aaa
commit
580e248908
@ -174,14 +174,14 @@ async def profile(context):
|
|||||||
user_object = await context.client.get_entity(user)
|
user_object = await context.client.get_entity(user)
|
||||||
target_user = await context.client(GetFullUserRequest(user_object.id))
|
target_user = await context.client(GetFullUserRequest(user_object.id))
|
||||||
except (TypeError, ValueError, OverflowError, StructError) as exception:
|
except (TypeError, ValueError, OverflowError, StructError) as exception:
|
||||||
if str(exception).startswith("出错了呜呜呜 ~ 找不到与之对应的任何内容"):
|
if str(exception).startswith("Cannot find any entity corresponding to"):
|
||||||
await context.edit("出错了呜呜呜 ~ 指定的用户不存在。")
|
await context.edit("出错了呜呜呜 ~ 指定的用户不存在。")
|
||||||
return
|
return
|
||||||
if str(exception).startswith("出错了呜呜呜 ~ 没有用户"):
|
if str(exception).startswith("No user has"):
|
||||||
await context.edit("出错了呜呜呜 ~ 指定的道纹不存在。")
|
await context.edit("出错了呜呜呜 ~ 指定的道纹不存在。")
|
||||||
return
|
return
|
||||||
if str(exception).startswith("出错了呜呜呜 ~ 您确定输入了东西?") or isinstance(exception, StructError):
|
if str(exception).startswith("Could not find the input entity for") or isinstance(exception, StructError):
|
||||||
await context.edit("出错了呜呜呜 ~ 找不到对应的 UserID 。")
|
await context.edit("出错了呜呜呜 ~ 无法通过此 UserID 找到对应的用户。")
|
||||||
return
|
return
|
||||||
if isinstance(exception, OverflowError):
|
if isinstance(exception, OverflowError):
|
||||||
await context.edit("出错了呜呜呜 ~ 指定的 UserID 已超出长度限制,您确定输对了?")
|
await context.edit("出错了呜呜呜 ~ 指定的 UserID 已超出长度限制,您确定输对了?")
|
||||||
|
Loading…
Reference in New Issue
Block a user