Skip to content

Commit

Permalink
Log an error if a deleted message is null
Browse files Browse the repository at this point in the history
  • Loading branch information
Erisa committed Jul 28, 2024
1 parent c572f6b commit 80398bf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Events/MessageEvent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ public static async Task MessageDeleted(DiscordClient client, MessageDeletedEven
{
if (e.Message is null)
{
client.Logger.LogDebug("Got a message delete event but the message was null!");
client.Logger.LogError("Got a message delete event but the message was null!");
return;
} else if (e.Message.Author is null)
{
client.Logger.LogDebug("Got a message delete event for a message with no author: {message}", DiscordHelpers.MessageLink(e.Message));
Expand Down

0 comments on commit 80398bf

Please sign in to comment.