Archived
1

Fix bot failure on 10th grade hands in profiles

This commit is contained in:
Vladimir Hodakov 2018-03-31 10:05:59 +04:00
parent dbaa85a517
commit 3129566a1c

View File

@ -175,7 +175,11 @@ func (u *Users) ParseProfile(update *tgbotapi.Update, playerRaw *dbmapping.Playe
pkName := strings.Split(pokememeString, "+")[0] pkName := strings.Split(pokememeString, "+")[0]
pkName = strings.Replace(pkName, " ⭐", "", 1) pkName = strings.Replace(pkName, " ⭐", "", 1)
pkName = strings.TrimSuffix(pkName, " ") pkName = strings.TrimSuffix(pkName, " ")
if strings.Contains(pkName, "🔟") {
pkName = strings.Split(pkName, "🔟 ")[1]
} else {
pkName = strings.Split(pkName, "⃣ ")[1] pkName = strings.Split(pkName, "⃣ ")[1]
}
pokememes[strconv.Itoa(pi)+"_"+pkName] = pkAttack pokememes[strconv.Itoa(pi)+"_"+pkName] = pkAttack
powerInt += c.Statistics.GetPoints(pkAttack) powerInt += c.Statistics.GetPoints(pkAttack)
} }