Skip to content

Commit

Permalink
绑定提示词
Browse files Browse the repository at this point in the history
  • Loading branch information
Ohdmire committed Dec 31, 2024
1 parent 18c5207 commit 4679f4d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ATRIlib/bind.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,21 @@ async def update_bind_info(qq_id,osuname):
update_user(userdata)
return update_bind(qq_id, userdata)
else:
raise ValueError(f'无法在ppy中找到{osuname}')
raise ValueError(f'无法在ppy的数据库中找到{osuname}')

# 通过bind数据库获取userstruct
def get_userstruct_from_bind(qq_id):
bindstruct = find_bind(qq_id)
if bindstruct is None:
raise ValueError(f'无法在数据库中找到{qq_id}绑定的对象\n尝试输入!getbind osuname')
raise ValueError(f'无法在数据库中找到qq={qq_id}绑定的对象\n尝试输入 !getbind')
else:
userstruct = db_user.find_one({'id': bindstruct["user_id"]})
return userstruct

async def get_userstrct_update_from_bind(qq_id):
userstruct = get_userstruct_from_bind(qq_id)
if userstruct is None:
raise ValueError(f'无法在数据库中找到{qq_id}绑定的对象\n尝试输入!getbind osuname')
raise ValueError(f'无法在数据库中找到qq={qq_id}绑定的对象\n尝试输入 !getbind')
else:
userstruct = await update_user_info(userstruct['username'])
return userstruct
Expand Down

0 comments on commit 4679f4d

Please sign in to comment.