Skip to content

Commit

Permalink
Update ChannelCreateAuditLogData.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
brankin3 committed Nov 15, 2018
1 parent f9c95bc commit 6c8b862
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ internal static ChannelCreateAuditLogData Create(BaseDiscordClient discord, Mode

foreach (var overwrite in overwritesModel.NewValue)
{
var deny = overwrite.Value<ulong>("deny");
var permType = overwrite.Value<PermissionTarget>("type");
var id = overwrite.Value<ulong>("id");
var allow = overwrite.Value<ulong>("allow");
var deny = overwrite["deny"].ToObject<ulong>(discord.ApiClient.Serializer);
var permType = overwrite["type"].ToObject<PermissionTarget>(discord.ApiClient.Serializer);
var id = overwrite["id"].ToObject<ulong>(discord.ApiClient.Serializer);
var allow = overwrite["allow"].ToObject<ulong>(discord.ApiClient.Serializer);

overwrites.Add(new Overwrite(id, permType, new OverwritePermissions(allow, deny)));
}
Expand Down

1 comment on commit 6c8b862

@brankin3
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to using the indexer to fetch the token first, then calling ToObject on them and passing the serializer to allow for proper deserialization, and fixing that weird bug that happens when it tries to read Channel Create Audit entries

Please sign in to comment.