Skip to content

Commit

Permalink
Merge pull request #20 from Kirollos/develop
Browse files Browse the repository at this point in the history
Final Build 2.0.0
  • Loading branch information
dassjosh authored Aug 19, 2021
2 parents d0b1251 + fc797f8 commit e8c4af1
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions Oxide.Ext.Discord/Entities/Gatway/EventPayload.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Oxide.Ext.Discord.Entities.Gatway.Events;
using Oxide.Ext.Discord.Helpers.Converters;
using Oxide.Ext.Discord.WebSockets;

namespace Oxide.Ext.Discord.Entities.Gatway
Expand All @@ -12,11 +11,6 @@ namespace Oxide.Ext.Discord.Entities.Gatway
[JsonObject(MemberSerialization = MemberSerialization.OptIn)]
public class EventPayload
{
private static readonly JsonSerializer Serializer = new JsonSerializer
{
Converters = { new DiscordEnumConverter() }
};

/// <summary>
/// Op Code for the payload
/// </summary>
Expand Down Expand Up @@ -44,7 +38,7 @@ public class EventPayload
/// <summary>
/// Returns a DispatchCode enum value for the EventName if the extension supports it; Else the code will be Unknown
/// </summary>
public DispatchCode EventCode => EventName?.ToObject<DispatchCode>(Serializer) ?? DispatchCode.Unknown;
public DispatchCode EventCode => EventName?.ToObject<DispatchCode>() ?? DispatchCode.Unknown;

/// <summary>
/// Data as JObject
Expand Down

0 comments on commit e8c4af1

Please sign in to comment.