|
|
@ -69,7 +69,7 @@ func handlePrestigeRequest(s *discordgo.Session, m *discordgo.MessageCreate) {
|
|
|
|
|
|
|
|
|
|
|
|
var lowerLevelWarning string
|
|
|
|
var lowerLevelWarning string
|
|
|
|
if newPrestigeLevel <= currentPrestigeLevel {
|
|
|
|
if newPrestigeLevel <= currentPrestigeLevel {
|
|
|
|
lowerLevelWarning = "**WARNING: Your new prestige multiplier is NOT higher than your current prestige multiplier."
|
|
|
|
lowerLevelWarning = "**WARNING:** *Your new prestige multiplier is __NOT__ higher than your current prestige multiplier.*"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
nearestPowerOfTen := math.Pow10(int(math.Floor(math.Log10(float64(newPrestigeLevel)))))
|
|
|
|
nearestPowerOfTen := math.Pow10(int(math.Floor(math.Log10(float64(newPrestigeLevel)))))
|
|
|
|
nextNearestLogicalPrestige := int((math.Floor(float64(newPrestigeLevel)/nearestPowerOfTen) + 1) * nearestPowerOfTen)
|
|
|
|
nextNearestLogicalPrestige := int((math.Floor(float64(newPrestigeLevel)/nearestPowerOfTen) + 1) * nearestPowerOfTen)
|
|
|
@ -116,5 +116,9 @@ func checkPrestigeReact(s *discordgo.Session, m *discordgo.MessageReactionAdd) {
|
|
|
|
newPrestigeLevel := xp/prestigeRequirement + 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,
|
|
|
|
|
|
|
|
fmt.Sprintf(
|
|
|
|
|
|
|
|
"**PRESTIGE > ** <@%s>, you have prestiged!", m.UserID,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|