From 87e2757dac6fbaa1c7ad7c58d43763106d8b382f Mon Sep 17 00:00:00 2001 From: Abheek Dhawan Date: Wed, 31 Mar 2021 15:02:30 -0500 Subject: [PATCH] Fix null errors pt 2 --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 2d75fc9..d16cba3 100644 --- a/index.js +++ b/index.js @@ -49,7 +49,7 @@ client.on('channelCreate', channel => { const channelName = channel.name; const channelID = channel.id; let channelCategory; - if (channel.parent.name) { + if (channel.parent) { channelCategory = channel.parent.name; } else { channelCategory = "None";