mirror of
https://github.com/Genshin-bots/gsuid_core.git
synced 2025-05-08 04:56:00 +08:00
🐛 修复默认参数
This commit is contained in:
parent
0b2e90f79b
commit
f827e061f3
@ -170,13 +170,19 @@ class CoreUser(BaseBotIDModel, table=True):
|
||||
user_id=user_id,
|
||||
group_id=group_id,
|
||||
)
|
||||
|
||||
opt = {}
|
||||
if user_name is not None:
|
||||
opt['user_name'] = user_name
|
||||
if user_icon is not None:
|
||||
opt['user_icon'] = user_icon
|
||||
|
||||
if not data:
|
||||
await cls.full_insert_data(
|
||||
bot_id=bot_id,
|
||||
user_id=user_id,
|
||||
group_id=group_id,
|
||||
user_name=user_name,
|
||||
user_icon=user_icon,
|
||||
**opt,
|
||||
)
|
||||
else:
|
||||
await cls.update_data_by_xx(
|
||||
@ -185,8 +191,7 @@ class CoreUser(BaseBotIDModel, table=True):
|
||||
'user_id': user_id,
|
||||
'group_id': group_id,
|
||||
},
|
||||
user_name=user_name,
|
||||
user_icon=user_icon,
|
||||
**opt,
|
||||
)
|
||||
|
||||
'''
|
||||
|
Loading…
x
Reference in New Issue
Block a user