mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-26 21:14:19 +00:00
🐛 Fix /fortune seed
This commit is contained in:
parent
bf52806bbc
commit
521b3d9251
1 changed files with 2 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue