From 7600a9e5a6aafacfb71deba7411b3fa433ae9955 Mon Sep 17 00:00:00 2001 From: Luther Wen Xu Date: Tue, 19 Nov 2019 16:08:47 +0800 Subject: [PATCH] prestige: Lower requirement to level 5 --- messageCreate.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/messageCreate.go b/messageCreate.go index 03e0fdf..8f5c4ef 100644 --- a/messageCreate.go +++ b/messageCreate.go @@ -10,6 +10,7 @@ import ( const generalChannelID = "645550570001924098" const emojiCheck = "✅" +const prestigeRequirement = 90000 var prestigeList = make(map[string]string) @@ -59,9 +60,9 @@ func handleShardRequest(s *discordgo.Session, m *discordgo.MessageCreate) { func handlePrestigeRequest(s *discordgo.Session, m *discordgo.MessageCreate) { currentPrestigeLevel := getPrestige(s, m.Author.ID) xp := getXP(s, m.Author.ID) - newPrestigeLevel := xp/130000 + 1 + newPrestigeLevel := xp/prestigeRequirement + 1 - if xp < levelUpRequirementCache[4] && currentPrestigeLevel == 1 { + if xp < levelUpRequirementCache[3] && currentPrestigeLevel == 1 { s.ChannelMessageSend(m.ChannelID, "**PRESTIGE > **Prestige is only unlocked after level 5!") return } @@ -81,7 +82,7 @@ func handlePrestigeRequest(s *discordgo.Session, m *discordgo.MessageCreate) { m.Author.ID, currentPrestigeLevel, newPrestigeLevel, - nextNearestLogicalPrestige, float64(xp)/float64(130000*(nextNearestLogicalPrestige-1))*100, + nextNearestLogicalPrestige, float64(xp)/float64(prestigeRequirement*(nextNearestLogicalPrestige-1))*100, lowerLevelWarning, ), ) @@ -109,7 +110,7 @@ func checkPrestigeReact(s *discordgo.Session, m *discordgo.MessageReactionAdd) { return } xp := getXP(s, m.UserID) - newPrestigeLevel := xp/130000 + 1 + newPrestigeLevel := xp/prestigeRequirement + 1 go cleanUpRole(s, m.UserID) setPrestige(s, m.UserID, newPrestigeLevel) s.ChannelMessageSend(m.ChannelID, "**PRESTIGE > ** <@%s>, you have prestiged!")