mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2026-10-03 19:00:00 +08:00
update code
This commit is contained in:
@@ -1,15 +1,14 @@
|
||||
from models.sigin_group_user import SignGroupUser
|
||||
from models.sign_group_user import SignGroupUser
|
||||
|
||||
|
||||
async def effect(user_id: int, group_id: int, name: str) -> bool:
|
||||
if name == "好感双倍加持卡Ⅰ":
|
||||
if name in ["好感双倍加持卡Ⅰ", "好感度双倍加持卡Ⅰ"]:
|
||||
user = await SignGroupUser.ensure(user_id, group_id)
|
||||
await user.update(add_probability=0.1).apply()
|
||||
if name == "好感双倍加持卡Ⅱ":
|
||||
if name in ["好感双倍加持卡Ⅱ", "好感度双倍加持卡Ⅱ"]:
|
||||
user = await SignGroupUser.ensure(user_id, group_id)
|
||||
await user.update(add_probability=0.2).apply()
|
||||
if name == "好感双倍加持卡Ⅲ":
|
||||
if name in ["好感双倍加持卡Ⅲ", "好感度双倍加持卡Ⅲ"]:
|
||||
user = await SignGroupUser.ensure(user_id, group_id)
|
||||
print(user.user_qq)
|
||||
await user.update(add_probability=0.3).apply()
|
||||
return True
|
||||
|
||||
Reference in New Issue
Block a user