mirror of
https://github.com/syuilo/ai.git
synced 2024-11-12 17:08:00 +00:00
Fix #23
This commit is contained in:
parent
6ed96a2a26
commit
9c6ede81b1
|
@ -224,7 +224,7 @@ export default class FortuneModule implements IModule {
|
|||
public onMention = (msg: MessageLike) => {
|
||||
if (msg.includes(['占', 'うらな', '運勢', 'おみくじ'])) {
|
||||
const date = new Date();
|
||||
const seed = `${date.getFullYear()}/${date.getMonth()}/${date.getDay()}@${msg.userId}`;
|
||||
const seed = `${date.getFullYear()}/${date.getMonth()}/${date.getDate()}@${msg.userId}`;
|
||||
const rng = seedrandom(seed);
|
||||
const omikuji = omikujis[Math.floor(rng() * omikujis.length)];
|
||||
const itemPrefix = Math.floor(rng() * 5) != 0 ? itemPrefixes[Math.floor(rng() * itemPrefixes.length)] : '';
|
||||
|
|
Loading…
Reference in a new issue