diff --git a/level/roles.go b/level/roles.go index 6024a70..fe0177a 100644 --- a/level/roles.go +++ b/level/roles.go @@ -32,6 +32,10 @@ func AssignRoles(dg *discordgo.Session, guildID string, userID string, rank Rank util.ReportError(dg, err) return } + //FIXME: Hack. To prevent someone who isn't part of the server yet to be assigned a role. + if len(member.Roles) == 0 { + return + } OuterLoop: for i := 0; i <= int(rank); i++ { if i >= len(Roles) {