diff --git a/DiscordChatExporter/Services/DataService.cs b/DiscordChatExporter/Services/DataService.cs index cabc2dcf..11ecc2cf 100644 --- a/DiscordChatExporter/Services/DataService.cs +++ b/DiscordChatExporter/Services/DataService.cs @@ -52,7 +52,7 @@ namespace DiscordChatExporter.Services // Get basic data var id = token["id"].Value(); var type = (ChannelType) token["type"].Value(); - var topic = token["topic"].Value(); + var topic = token["topic"]?.Value(); // Extract name based on type string name; @@ -74,7 +74,7 @@ namespace DiscordChatExporter.Services // Get basic data var id = token["id"].Value(); var timeStamp = token["timestamp"].Value(); - var editedTimeStamp = token["edited_timestamp"].Value(); + var editedTimeStamp = token["edited_timestamp"]?.Value(); var content = token["content"].Value(); var type = (MessageType) token["type"].Value();