Advertisement
mal-codes

..

May 18th, 2019
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. //IN ROOM
  2. client.on('message', message => {
  3. if(message.channel.type === 'dm') {
  4. let room= "THE ID OF THE ROOM";
  5. let sender=message.author
  6. const embed=new RichEmbed()
  7. .setTitle('Message send to the dm of the Bot')
  8. .setColor('RANDOM')
  9. .addField('Send BY' , sender.username) //Mal Ahmed
  10. .addField('Message Sent' , message.content) //Mal Ahmed
  11. .setFooter('Mal ahmed'); //mal Ahmed
  12. client.channels.get(room).send(embed);
  13. }
  14.  
  15. });
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23. // IN YOUR DM
  24. client.on('message', message => {
  25. if(message.channel.type === 'dm') {
  26. let id= "YOUR ID";
  27. let sender=message.author
  28. const embed=new RichEmbed()
  29. .setTitle('Message send to the dm of the Bot')
  30. .setColor('RANDOM')
  31. .addField('Send BY' , sender.username) //Mal Ahmed
  32. .addField('Message Sent' , message.content) //Mal Ahmed
  33. .setFooter('Mal ahmed'); //mal Ahmed
  34. client.users.get(id).send(embed);
  35. }
  36.  
  37. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement