From 2cfcfc878bfd1dcc8831737d0f1a76f933faf601 Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 3 Jan 2019 16:23:01 +0900 Subject: [PATCH] Refactor --- src/modules/fortune/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/fortune/index.ts b/src/modules/fortune/index.ts index 7a40f89..d3d0b64 100644 --- a/src/modules/fortune/index.ts +++ b/src/modules/fortune/index.ts @@ -4,7 +4,7 @@ import MessageLike from '../../message-like'; import serifs from '../../serifs'; import * as seedrandom from 'seedrandom'; -const omikujis = [ +const blessing = [ '藍吉', 'ギガ吉', 'メガ吉', @@ -226,7 +226,7 @@ export default class FortuneModule implements IModule { const date = new Date(); const seed = `${date.getFullYear()}/${date.getMonth()}/${date.getDate()}@${msg.userId}`; const rng = seedrandom(seed); - const omikuji = omikujis[Math.floor(rng() * omikujis.length)]; + const omikuji = blessing[Math.floor(rng() * blessing.length)]; const itemPrefix = Math.floor(rng() * 5) != 0 ? itemPrefixes[Math.floor(rng() * itemPrefixes.length)] : ''; const item = items[Math.floor(rng() * items.length)]; msg.reply(`**${omikuji}🎉**\nラッキーアイテム: ${itemPrefix}${item}`, serifs.fortune.cw(msg.friend.name));