Browse Source

Never send null roleIds in User.Edit

tags/docs-0.9
RogueException 9 years ago
parent
commit
24c97a93f7
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/Discord.Net/Models/User.cs

+ 1
- 1
src/Discord.Net/Models/User.cs View File

@@ -239,7 +239,7 @@ namespace Discord
if (Server == null) throw new InvalidOperationException("Unable to edit users in a private channel"); if (Server == null) throw new InvalidOperationException("Unable to edit users in a private channel");


//Modify the roles collection and filter out the everyone role //Modify the roles collection and filter out the everyone role
var roleIds = roles == null ? null : roles
var roleIds = (roles ?? Roles)
.Where(x => !x.IsEveryone) .Where(x => !x.IsEveryone)
.Select(x => x.Id) .Select(x => x.Id)
.Distinct() .Distinct()


Loading…
Cancel
Save