|
|
@ -10,6 +10,7 @@ import (
|
|
|
|
|
|
|
|
|
|
|
|
const generalChannelID = "645550570001924098"
|
|
|
|
const generalChannelID = "645550570001924098"
|
|
|
|
const emojiCheck = "✅"
|
|
|
|
const emojiCheck = "✅"
|
|
|
|
|
|
|
|
const prestigeRequirement = 90000
|
|
|
|
|
|
|
|
|
|
|
|
var prestigeList = make(map[string]string)
|
|
|
|
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) {
|
|
|
|
func handlePrestigeRequest(s *discordgo.Session, m *discordgo.MessageCreate) {
|
|
|
|
currentPrestigeLevel := getPrestige(s, m.Author.ID)
|
|
|
|
currentPrestigeLevel := getPrestige(s, m.Author.ID)
|
|
|
|
xp := getXP(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!")
|
|
|
|
s.ChannelMessageSend(m.ChannelID, "**PRESTIGE > **Prestige is only unlocked after level 5!")
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -81,7 +82,7 @@ func handlePrestigeRequest(s *discordgo.Session, m *discordgo.MessageCreate) {
|
|
|
|
m.Author.ID,
|
|
|
|
m.Author.ID,
|
|
|
|
currentPrestigeLevel,
|
|
|
|
currentPrestigeLevel,
|
|
|
|
newPrestigeLevel,
|
|
|
|
newPrestigeLevel,
|
|
|
|
nextNearestLogicalPrestige, float64(xp)/float64(130000*(nextNearestLogicalPrestige-1))*100,
|
|
|
|
nextNearestLogicalPrestige, float64(xp)/float64(prestigeRequirement*(nextNearestLogicalPrestige-1))*100,
|
|
|
|
lowerLevelWarning,
|
|
|
|
lowerLevelWarning,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
)
|
|
|
|
)
|
|
|
@ -109,7 +110,7 @@ func checkPrestigeReact(s *discordgo.Session, m *discordgo.MessageReactionAdd) {
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
xp := getXP(s, m.UserID)
|
|
|
|
xp := getXP(s, m.UserID)
|
|
|
|
newPrestigeLevel := xp/130000 + 1
|
|
|
|
newPrestigeLevel := xp/prestigeRequirement + 1
|
|
|
|
go cleanUpRole(s, m.UserID)
|
|
|
|
go cleanUpRole(s, m.UserID)
|
|
|
|
setPrestige(s, m.UserID, newPrestigeLevel)
|
|
|
|
setPrestige(s, m.UserID, newPrestigeLevel)
|
|
|
|
s.ChannelMessageSend(m.ChannelID, "**PRESTIGE > ** <@%s>, you have prestiged!")
|
|
|
|
s.ChannelMessageSend(m.ChannelID, "**PRESTIGE > ** <@%s>, you have prestiged!")
|
|
|
|