mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2025-12-15 14:22:55 +08:00
🐛 修复私聊无法使用道具
This commit is contained in:
parent
3856ba09bb
commit
dd93d081ba
@ -58,9 +58,9 @@ class Goods(BaseModel):
|
||||
class ShopParam(BaseModel):
|
||||
goods_name: str
|
||||
"""商品名称"""
|
||||
user_id: int
|
||||
user_id: str | None
|
||||
"""用户id"""
|
||||
group_id: int
|
||||
group_id: str | None
|
||||
"""群聊id"""
|
||||
bot: Any
|
||||
"""bot"""
|
||||
|
||||
@ -38,7 +38,7 @@ driver: Driver = nonebot.get_driver()
|
||||
"好感度双倍加持卡Ⅲ_prob": 0.3,
|
||||
}, # type: ignore
|
||||
)
|
||||
async def _(session: EventSession, user_id: int, prob: float):
|
||||
async def _(session: EventSession, user_id: str, prob: float):
|
||||
if session.id1:
|
||||
user_console = await UserConsole.get_user(session.id1, session.platform)
|
||||
user, _ = await SignUser.get_or_create(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user