modules/roles: Don't assign old level role again

master
Luther Wen Xu 2019-11-29 22:10:01 +07:00
parent 19e016ae78
commit 2fc1e22e23
Signed by: chanbakjsd
GPG Key ID: B7D77E3E9D102B70
1 changed files with 1 additions and 1 deletions

@ -8,7 +8,7 @@ import (
) )
func GiveLevelRoles(s *discordgo.Session, discordID string, oldLevel, newLevel int) { func GiveLevelRoles(s *discordgo.Session, discordID string, oldLevel, newLevel int) {
for i := oldLevel; i <= newLevel; i++ { for i := oldLevel + 1; i <= newLevel; i++ {
s.GuildMemberRoleAdd(config.GuildID, discordID, rolesFromLevel[i-1]) s.GuildMemberRoleAdd(config.GuildID, discordID, rolesFromLevel[i-1])
} }
} }