Actually show where the messages are being forwarded to in .toggleimages

This commit is contained in:
Wizzard 2024-02-08 20:41:01 -05:00
parent e8a092a7a9
commit 92b14f21f9
1 changed files with 4 additions and 4 deletions

View File

@ -67,11 +67,11 @@ client.on('messageCreate', async message => {
if (args.length === 1) { if (args.length === 1) {
let response = "Image forwarding status for channels:\n"; let response = "Image forwarding status for channels:\n";
Object.keys(channelMappings).forEach(sourceChannelId => { Object.keys(channelMappings).forEach(sourceChannelId => {
if (sourceChannelId === 'undefined' || !sourceChannelId) { if (!sourceChannelId || sourceChannelId === 'undefined') return;
return;
} const targetChannelId = channelMappings[sourceChannelId];
const status = channelSettings.includeImages[sourceChannelId] ? "Enabled" : "Disabled"; const status = channelSettings.includeImages[sourceChannelId] ? "Enabled" : "Disabled";
response += `- <#${sourceChannelId}> - (${sourceChannelId}): ${status}\n`; response += `- <#${sourceChannelId}> to <#${targetChannelId}>: ${status}\n`;
}); });
return message.channel.send(response).then(msg => setTimeout(() => msg.delete(), 10000)); return message.channel.send(response).then(msg => setTimeout(() => msg.delete(), 10000));
} else if (args.length === 2) { } else if (args.length === 2) {