From 72bb088e7239e911cc2130ffe8d6ffaa761e8d54 Mon Sep 17 00:00:00 2001 From: Cynthia Foxwell Date: Wed, 21 May 2025 13:12:13 -0600 Subject: [PATCH] logging: null check target.parentID for parent channel --- src/modules/logging.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/modules/logging.js b/src/modules/logging.js index a7e1cb6..d31e93b 100644 --- a/src/modules/logging.js +++ b/src/modules/logging.js @@ -553,7 +553,10 @@ events.add("guildAuditLogEntryCreate", "logging", async function (entry) { break; } case AuditLogActions.THREAD_UPDATE: { - const parentChannel = entry.guild.channels.get(entry.target.parentID); + const parentChannel = + entry.target != null && entry.target.parentID != null + ? entry.guild.channels.get(entry.target.parentID) + : null; let tagDiff; if (after.applied_tags != null) {