Fixed potentional nilptr access in sortuserroles
MODIFY
discordutil/users.go
discordutil/users.go
@@ -125,6 +125,10 @@ func SortUserRoles(roles []string, guildRoles []*discordgo.Role) {
return true
}
+ if firstRole == nil {
+ return false
+ }
+
return firstRole.Position > secondRole.Position
})
}

Fixed potentional nilptr access in sortuserroles