prestige: Lower requirement to level 5

master
Luther Wen Xu 2019-11-19 16:08:47 +07:00
parent 9956606bc7
commit 7600a9e5a6
Signed by: chanbakjsd
GPG Key ID: B7D77E3E9D102B70
1 changed files with 5 additions and 4 deletions

@ -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!")