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