no negative candy for indebted users

This commit is contained in:
skeletable 2022-10-02 17:18:33 +02:00
parent f471ee2734
commit e079438254
1 changed files with 3 additions and 0 deletions

View File

@ -749,6 +749,9 @@ func messageCreate(s *discordgo.Session, m *discordgo.MessageCreate) {
candyvalue *= multiplier
candystr = "+" + fmt.Sprint(candyvalue)
} else if m.Embeds[0].Footer.Text != "candyChaos" {
if usercandy < 0 {
candyvalue = int(math.Abs(float64(candyvalue)))
}
candystr = fmt.Sprint(candyvalue)
} else {
multiplier = rand.Intn(21) - 10