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(
m.ChannelID,
fmt.Sprintf(
"<@%s> is now level %d. (%d XP/%d XP)",
m.Author.ID, level, xp, levelUpRequirement,
"<@%s> is now level %d. (%d XP/%d XP) [%.1f%%]",
m.Author.ID, level, xp, levelUpRequirement, float64(xp)/float64(levelUpRequirement)*100,
),
)
}