From 13ed901c52901dc93f4e42564c217040a1a703e8 Mon Sep 17 00:00:00 2001 From: Misha133 Date: Thu, 2 Feb 2023 19:37:53 +0300 Subject: [PATCH] forgot nullability --- src/Discord.Net.WebSocket/DiscordSocketClient.cs | 2 +- .../Entities/Guilds/AutoModActionExecutedData.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Discord.Net.WebSocket/DiscordSocketClient.cs b/src/Discord.Net.WebSocket/DiscordSocketClient.cs index 15a848d56..2c8518b5e 100644 --- a/src/Discord.Net.WebSocket/DiscordSocketClient.cs +++ b/src/Discord.Net.WebSocket/DiscordSocketClient.cs @@ -2991,7 +2991,7 @@ namespace Discord.WebSocket data.TriggerType, cacheableUser, cacheableChannel, - cacheableMessage, + cachedMsg is not null ? cacheableMessage : null, data.AlertSystemMessageId.GetValueOrDefault(0), data.Content, data.MatchedContent.IsSpecified diff --git a/src/Discord.Net.WebSocket/Entities/Guilds/AutoModActionExecutedData.cs b/src/Discord.Net.WebSocket/Entities/Guilds/AutoModActionExecutedData.cs index d6b3204f9..0643c1500 100644 --- a/src/Discord.Net.WebSocket/Entities/Guilds/AutoModActionExecutedData.cs +++ b/src/Discord.Net.WebSocket/Entities/Guilds/AutoModActionExecutedData.cs @@ -30,7 +30,7 @@ public class AutoModActionExecutedData /// /// This property will be if the message was blocked by the automod. /// - public Cacheable Message { get; } + public Cacheable? Message { get; } /// /// Gets the id of the system auto moderation messages posted as a result of this action. @@ -66,7 +66,7 @@ public class AutoModActionExecutedData AutoModTriggerType triggerType, Cacheable user, Cacheable channel, - Cacheable message, + Cacheable? message, ulong alertMessageId, string content, string matchedContent,