From e8a092a7a9b40f37d278c8754b16881211461fe8 Mon Sep 17 00:00:00 2001 From: Wizzard Date: Thu, 8 Feb 2024 20:33:21 -0500 Subject: [PATCH] Log channels mapped & fix bug in .toggleimages that showed "undefinied" channel --- main.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main.js b/main.js index cfd9611..ee250a0 100644 --- a/main.js +++ b/main.js @@ -39,6 +39,7 @@ client.on('ready', () => { status: 'invisible' }) setInterval(processMessageQueue, BATCH_INTERVAL); + console.log("Channel Mappings:", channelMappings); }); const outputsDir = path.join(__dirname, 'outputs'); @@ -66,6 +67,9 @@ client.on('messageCreate', async message => { if (args.length === 1) { let response = "Image forwarding status for channels:\n"; Object.keys(channelMappings).forEach(sourceChannelId => { + if (sourceChannelId === 'undefined' || !sourceChannelId) { + return; + } const status = channelSettings.includeImages[sourceChannelId] ? "Enabled" : "Disabled"; response += `- <#${sourceChannelId}> - (${sourceChannelId}): ${status}\n`; });