Browse Source

Let's not forget another one

pull/1608/head
Paulo 5 years ago
parent
commit
cd69874f3f
1 changed files with 10 additions and 1 deletions
  1. +10
    -1
      src/Discord.Net.Rest/Entities/Channels/ChannelHelper.cs

+ 10
- 1
src/Discord.Net.Rest/Entities/Channels/ChannelHelper.cs View File

@@ -28,7 +28,16 @@ namespace Discord.Rest
{
Name = args.Name,
Position = args.Position,
CategoryId = args.CategoryId
CategoryId = args.CategoryId,
Overwrites = args.PermissionOverwrites.IsSpecified
? args.PermissionOverwrites.Value.Select(overwrite => new API.Overwrite
{
TargetId = overwrite.TargetId,
TargetType = overwrite.TargetType,
Allow = overwrite.Permissions.AllowValue,
Deny = overwrite.Permissions.DenyValue
}).ToArray()
: Optional.Create<API.Overwrite[]>(),
};
return await client.ApiClient.ModifyGuildChannelAsync(channel.Id, apiArgs, options).ConfigureAwait(false);
}


Loading…
Cancel
Save