Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

take from your discord bot dms discord js

let channelID = "X";
let guildID = "X";
client.on('message', (message) => {
  if(message.channel.type === 'dm'){
    let embed = new Discord.RichEmbed()
    .setAuthor(client.guilds.get(guildID).members.get(message.author.id).displayName, message.author.displayAvatarURL)
    .setColor('#FAA')
    .setDescription(message.content);
    client.channels.get(channelID).send(embed);
  }
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #discord #bot #dms #discord #js
ADD COMMENT
Topic
Name
5+5 =