|
|
|
@ -17,7 +17,7 @@ func QueueRoles(dg *discordgo.Session) {
|
|
|
|
|
for {
|
|
|
|
|
time.Sleep(5 * time.Second)
|
|
|
|
|
for guildID, v := range ShouldCheck {
|
|
|
|
|
for userID, _ := range v {
|
|
|
|
|
for userID := range v {
|
|
|
|
|
rank, _ := GetLevelFromXP(db.GetXP(userID))
|
|
|
|
|
AssignRoles(dg, guildID, userID, rank)
|
|
|
|
|
delete(v, userID)
|
|
|
|
@ -46,6 +46,10 @@ OuterLoop:
|
|
|
|
|
continue OuterLoop
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
dg.GuildMemberRoleAdd(guildID, userID, Roles[i])
|
|
|
|
|
err := dg.GuildMemberRoleAdd(guildID, userID, Roles[i])
|
|
|
|
|
if err != nil {
|
|
|
|
|
util.ReportError(dg, err)
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|