📜  从您的不和谐机器人 dms 不和谐 js 中获取 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:07.248000             🧑  作者: Mango

代码示例1
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);
  }
});