fix: Bot should not be given roles

master
Luther Wen Xu 2020-05-31 12:10:45 +07:00
parent fa21b5abf6
commit 069da9f1c6
Signed by: chanbakjsd
GPG Key ID: B7D77E3E9D102B70
1 changed files with 3 additions and 0 deletions

@ -36,6 +36,9 @@ func AssignRoles(dg *discordgo.Session, guildID string, userID string, rank Rank
if len(member.Roles) == 0 { if len(member.Roles) == 0 {
return return
} }
if member.User.Bot {
return
}
OuterLoop: OuterLoop:
for i := 0; i <= int(rank); i++ { for i := 0; i <= int(rank); i++ {
if i >= len(Roles) { if i >= len(Roles) {