Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //IN ROOM
- client.on('message', message => {
- if(message.channel.type === 'dm') {
- let room= "THE ID OF THE ROOM";
- let sender=message.author
- const embed=new RichEmbed()
- .setTitle('Message send to the dm of the Bot')
- .setColor('RANDOM')
- .addField('Send BY' , sender.username) //Mal Ahmed
- .addField('Message Sent' , message.content) //Mal Ahmed
- .setFooter('Mal ahmed'); //mal Ahmed
- client.channels.get(room).send(embed);
- }
- });
- // IN YOUR DM
- client.on('message', message => {
- if(message.channel.type === 'dm') {
- let id= "YOUR ID";
- let sender=message.author
- const embed=new RichEmbed()
- .setTitle('Message send to the dm of the Bot')
- .setColor('RANDOM')
- .addField('Send BY' , sender.username) //Mal Ahmed
- .addField('Message Sent' , message.content) //Mal Ahmed
- .setFooter('Mal ahmed'); //mal Ahmed
- client.users.get(id).send(embed);
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement