Advertisement
dfhfjjfgjfsfeedgf

Untitled

Apr 2nd, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. bot.on("messageUpdate", async(oldMessage, newMessage) =>{
  2. if(oldMessage.content === newMessage.content){
  3. return;
  4.  
  5. }
  6.  
  7. let loggingChannel = message.guild.channels.find(ch => ch.name === "logs")
  8. 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!");
  9. let logEmbed = new Discord.RichEmbed()
  10. .setAuthor(oldMessage.author.tag, oldMessage.author.avatarURL)
  11. .setThumbnail(oldMessage.author.avatarURL)
  12. .setColor("RANDOM")
  13. .setDescription("A message from a user was edited!")
  14. .addField("Before", oldMessage.content, true)
  15. .addField("After", newMessage.content, true)
  16. .setTimestamp()
  17.  
  18. loggingChannel.send(logEmbed);
  19. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement