const { Events } = require('discord.js'); const client = new Discord.Client({ intents: ['GuildMessages'] }) module.exports = { name: Events.MessageUpdate, once: false, async execute(oldMessage, newMessage, client) { console.log(Module works...?) if (newMessage.member.roles.cache.has('934153864758841435') === false) { console.log('The rol is not a bot') let channel = client.channels.cache.get('1000660671043731536') const embedUpdate = new EmbedBuilder() .setTitle('Mensaje Editado') .setAuthor({ name: `${newMessage.author.username}`, iconURL: `${newMessage.author.displayAvatarURL()}` }) .setDescription(`Mensaje editado en ${newMessage.channel}\n**ID Usuario:** ${newMessage.author.id}`) .setColor('E2F000') .setTimestamp(Date.now()) .setFooter({ text: 'El Hall de la Mena' }) .addFields( { name: 'Mensaje Antiguo:', value: `${oldMessage}` }, { name: 'Mensaje Nuevo:', value: `${newMessage}` } ) channel.send({embeds: [ embedUpdate ]}) } else { console.log('The rol is a bot') } } }