OK, so I'm coding a Discord bot. It already has a logging function, however I want it to ignore a specific category. Is there any way to do this easily? The logging code:
const { Server_Updates } = require("../settings/configuration").LOGGING;
const { MessageEmbed } = require(`discord.js`)
module.exports = {
execute: async(Client, oldMessEDIT, newMessEDIT) => {
const logChannel = Client.channels.cache.get(Server_Updates)
if (oldMessEDIT.author && oldMessEDIT.author.bot) return undefined
if (oldMessEDIT.content.length > 1020) return
if (newMessEDIT.content.length > 1020) return //
if (!oldMessEDIT.guild) return
let logEmbed = new MessageEmbed()
.setAuthor("A message was edited!")
.setColor(Client.color)
.setTimestamp()
.setFooter(`${newMessEDIT.guild.name} | `, newMessEDIT.guild.iconURL({ dynamic: true, format: 'png' }))
.addField("Message Before Edit:", oldMessEDIT.content)
.addField("Message After Edit:", newMessEDIT.content)
.addField("User:", `${newMessEDIT.author}`)
.addField("Channel Message Was Edited In:", oldMessEDIT.channel.toString())
if (logChannel) logChannel.send(logEmbed)
},
name: "messageUpdate",
};
The Config file attached to it:
LOGGING: {
Report_Channel: '848548626804375562',
Ban_Channel_Logs: '848548626804375562',
Unban_Channel_Logs: '848548626804375562',
Kick_Channel_Logs: '848548626804375562',
Warn_Channel_Logs: '848548626804375562',
Mute_Channel_Logs: '848548626804375562',
Lock_Channel_Logs: '848548626804375562',
Ticket_Channel_Logs: '848548626804375562',
Moderation_Channel_Logs: '848548626804375562',
Server_Updates: '848548626804375562',
Voice_Updates: '848548626804375562',
Bypass_Category: '848550022798639134'
},
Thanks in advance