We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
在 random.choice 之前可以设置 seed,如以当前日期和用户qq号作为 seed:
random.choice
seed
date = datetime.now().strftime("%Y%m%d") random.seed(f"{date}-{user_id}")
这样可以保证用户当天抽到的是一样的,还可以省去判断是否抽过签以及清理抽签图片的麻烦
The text was updated successfully, but these errors were encountered:
如此,如何对应抽签的图片和文案呢?
还需增加group_id
group_id
Sorry, something went wrong.
可以在抽图片和文案时都用同样的 seed 但我感觉图片每天是否一样并不影响 group_id 其实也可以不加,这样用户无论在那个群抽到的都是一样的 还是你来决定怎样合适吧
不是这个意思,是生成的seed如何与具体的图片+文案对应的问题,如果能对应,下次直接通过seed重复步骤生成即可,但是速度(当没缓存时)肯定比现在慢。 group_id是当找到对应方案后,我倾向于不同群分开管理。 这点倒是我v0.5.x想改进的方面。
图片+文案
v0.5.x
No branches or pull requests
在
random.choice
之前可以设置seed
,如以当前日期和用户qq号作为seed
:这样可以保证用户当天抽到的是一样的,还可以省去判断是否抽过签以及清理抽签图片的麻烦
The text was updated successfully, but these errors were encountered: