From 5a20314f4f372893dfe6786da6a28ff4c74befcc Mon Sep 17 00:00:00 2001 From: Luther Wen Xu Date: Mon, 18 Nov 2019 14:43:33 +0800 Subject: [PATCH] xp: Display level up percentage --- messageCreate.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/messageCreate.go b/messageCreate.go index f2eb461..ac74c64 100644 --- a/messageCreate.go +++ b/messageCreate.go @@ -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, ), ) }