Never send null roleIds in User.Edit

This commit is contained in:
RogueException
2016-01-01 21:07:38 -04:00
parent ccedfd2326
commit 24c97a93f7

View File

@@ -239,7 +239,7 @@ namespace Discord
if (Server == null) throw new InvalidOperationException("Unable to edit users in a private channel");
//Modify the roles collection and filter out the everyone role
var roleIds = roles == null ? null : roles
var roleIds = (roles ?? Roles)
.Where(x => !x.IsEveryone)
.Select(x => x.Id)
.Distinct()