mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2025-12-15 06:12:53 +08:00
使用OS提供的最高质量源生成随机数计算好感度
This commit is contained in:
parent
f39d53a865
commit
ca89ff7761
@ -16,6 +16,7 @@ import aiohttp
|
||||
import math
|
||||
import asyncio
|
||||
import os
|
||||
import secrets
|
||||
|
||||
|
||||
async def group_user_check_in(
|
||||
@ -41,7 +42,7 @@ async def _handle_check_in(
|
||||
nickname: str, user_qq: int, group: int, present: datetime
|
||||
) -> MessageSegment:
|
||||
user = await SignGroupUser.ensure(user_qq, group, for_update=True)
|
||||
impression_added = float(random.randint(10, 100))/100
|
||||
impression_added = (secrets.randbelow(90)+10)/100
|
||||
critx2 = random.random()
|
||||
add_probability = user.add_probability
|
||||
specify_probability = user.specify_probability
|
||||
|
||||
Loading…
Reference in New Issue
Block a user