From 521b3d92510f8cb5e8aae12c138c9648c358fa0d Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Fri, 30 Apr 2021 12:45:20 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20/fortune=20seed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- royalpack/commands/fortune.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/royalpack/commands/fortune.py b/royalpack/commands/fortune.py index a3b59ebf..b7b360e4 100644 --- a/royalpack/commands/fortune.py +++ b/royalpack/commands/fortune.py @@ -1,5 +1,6 @@ import royalnet.engineer as engi import random +import datetime # Tutte le fortunes qui devono essere positive :) @@ -63,7 +64,7 @@ async def fortune(*, _msg: engi.Message, **__): author = await _msg.sender - r = random.Random(x=author) + r = random.Random(x=hash(author) + hash(datetime.date.today())) message = r.sample(_fortunes, 1)[0] await _msg.reply(text=message)