mirror of
https://github.com/KimigaiiWuyi/GenshinUID.git
synced 2025-05-07 12:43:26 +08:00
🐛 修复一些BUG
This commit is contained in:
parent
a3f6078a9f
commit
5824815e50
@ -147,7 +147,7 @@ async def daily_sign():
|
||||
sqla = get_sqla(bot_id)
|
||||
user_list = await sqla.get_all_user()
|
||||
for user in user_list:
|
||||
if user.sign_switch != 'off':
|
||||
if user.sign_switch != 'off' and not user.status and user.uid:
|
||||
tasks.append(
|
||||
single_daily_sign(
|
||||
user.bot_id, user.uid, user.sign_switch, user.user_id
|
||||
|
@ -25,7 +25,7 @@ async def send_link_uid_msg(bot: Bot, ev: Event):
|
||||
return await bot.send('你输入了错误的格式!')
|
||||
|
||||
if '绑定' in ev.command:
|
||||
data = await sqla.insert_bind_data(qid, uid=uid)
|
||||
data = await sqla.insert_bind_data(qid, uid=uid, group_id=ev.group_id)
|
||||
return await send_diff_msg(
|
||||
bot,
|
||||
data,
|
||||
|
@ -33,6 +33,18 @@ async def get_uid(
|
||||
ev.text = ev.text.replace(uid, '')
|
||||
else:
|
||||
sqla = get_sqla(ev.bot_id)
|
||||
data = await sqla.select_bind_data(user_id)
|
||||
if data is not None:
|
||||
if not data.group_id:
|
||||
await sqla.update_bind_data(user_id, {'group_id': ev.group_id})
|
||||
else:
|
||||
new_group_list = data.group_id.split('|')
|
||||
if ev.group_id and ev.group_id not in new_group_list:
|
||||
new_group_list.append(ev.group_id)
|
||||
new_group = '|'.join(new_group_list)
|
||||
await sqla.update_bind_data(
|
||||
user_id, {'group_id': new_group}
|
||||
)
|
||||
uid = await sqla.get_bind_uid(user_id)
|
||||
if get_user_id:
|
||||
return uid, user_id
|
||||
|
Loading…
x
Reference in New Issue
Block a user