dfhfjjfgjfsfeedgf

Untitled

Apr 2nd, 2019
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. bot.on("messageUpdate", async(message, oldMessage, newMessage) =>{
  2. if(oldMessage.content === newMessage.content){
  3. return;
  4. }
  5.  
  6. let loggingChannel = message.guild.channels.find(`name`, "logs");
  7. if(!loggingChannel) return message.channel.send("I seems a message was edited but i cant find the correct channel to log it! Please make a channel called `logs` or do my configuration command to help you get started!");
  8. let logEmbed = new Discord.RichEmbed()
  9. .setAuthor(oldMessage.author.tag, oldMessage.author.avatarURL)
  10. .setThumbnail(oldMessage.author.avatarURL)
  11. .setColor("RANDOM")
  12. .setDescription("A message from a user was edited!")
  13. .addField("Before", oldMessage.content, true)
  14. .addField("After", newMessage.content, true)
  15. .setTimestamp()
  16.  
  17. loggingChannel.send(logEmbed);
Add Comment
Please, Sign In to add comment