xp: Display level up percentage

master
Luther Wen Xu 2019-11-18 14:43:33 +07:00
parent a89935beb6
commit 5a20314f4f
Signed by: chanbakjsd
GPG Key ID: B7D77E3E9D102B70
1 changed files with 2 additions and 2 deletions

@ -26,8 +26,8 @@ func handleXPRequest(s *discordgo.Session, m *discordgo.MessageCreate) {
s.ChannelMessageSend( s.ChannelMessageSend(
m.ChannelID, m.ChannelID,
fmt.Sprintf( fmt.Sprintf(
"<@%s> is now level %d. (%d XP/%d XP)", "<@%s> is now level %d. (%d XP/%d XP) [%.1f%%]",
m.Author.ID, level, xp, levelUpRequirement, m.Author.ID, level, xp, levelUpRequirement, float64(xp)/float64(levelUpRequirement)*100,
), ),
) )
} }