This commit is contained in:
smsteel 2019-02-11 01:39:29 +03:00
parent 5e960fb1b3
commit 75a0b40af5

2
bot.js
View File

@ -52,7 +52,7 @@ export const sendEvent = ({ type, displayName, ...payload }) => {
case EVENT_TYPE_PLAYER_LEVEL_CHANGE:
const { newLevel, oldLevel } = payload
saveLevel(displayName, newLevel)
if (oldLevel && newLevel < oldLevel) {
if (newLevel < oldLevel) {
return
}
const levelUpCount = getLevelUpCount(displayName)