Skip to content

Commit

Permalink
fix: topFourRankingLoreでOption.getしないように
Browse files Browse the repository at this point in the history
  • Loading branch information
rito528 committed Feb 28, 2023
1 parent d6b2b28 commit 7a0b7c7
Showing 1 changed file with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -382,14 +382,11 @@ object VoteMenu extends Menu {
topFourRanking.lift(1),
topFourRanking.lift(2),
topFourRanking.lift(3)
).flatMap { rankDataOpt =>
if (rankDataOpt.nonEmpty) {
val rankData = rankDataOpt.get.get
List(
s"${GRAY}たくさんくれたニンゲン第${rankData.rank}位!",
s"${GRAY}なまえ:${rankData.playerName} りんご:${rankData.consumed.amount}"
)
} else Nil
).flatMap(_.flatten).flatMap { rankData =>
List(
s"${GRAY}たくさんくれたニンゲン第${rankData.rank}位!",
s"${GRAY}なまえ:${rankData.playerName} りんご:${rankData.consumed.amount}"
)
}
val statistics = List(
s"${AQUA}ぜーんぶで${allEatenAppleAmount.amount}個もらえた!",
Expand Down

0 comments on commit 7a0b7c7

Please sign in to comment.