Log channels mapped & fix bug in .toggleimages that showed "undefinied" channel

This commit is contained in:
Wizzard 2024-02-08 20:33:21 -05:00
parent 82f2b77dfb
commit e8a092a7a9
1 changed files with 4 additions and 0 deletions

View File

@ -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`;
});