From da3c1f683263f1e4609e2890ee2e1b41a0dbfef5 Mon Sep 17 00:00:00 2001 From: JonKazama-Hellion Date: Sat, 2 May 2026 21:17:57 +0200 Subject: [PATCH] fix(emotes): mark required properties to silence CS8618 Mark Emote.Id, Top100.Id, Top100.Code and Top100.ImageType as required so the JSON deserializer enforces the contract instead of relying on default-null semantics. Removes the four CS8618 warnings the build has been carrying since v0.4.0. --- ChatTwo/EmoteCache.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ChatTwo/EmoteCache.cs b/ChatTwo/EmoteCache.cs index 34a7c20..366220d 100644 --- a/ChatTwo/EmoteCache.cs +++ b/ChatTwo/EmoteCache.cs @@ -35,20 +35,20 @@ public static class EmoteCache public Emote Emote { get; set; } [JsonPropertyName("id")] - public string Id { get; set; } + public required string Id { get; set; } } [Serializable] public struct Emote() { [JsonPropertyName("id")] - public string Id { get; set; } + public required string Id { get; set; } [JsonPropertyName("code")] - public string Code { get; set; } + public required string Code { get; set; } [JsonPropertyName("imageType")] - public string ImageType { get; set; } + public required string ImageType { get; set; } } public enum LoadingState