Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/36.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js 不和谐欢迎dm嵌入?_Node.js_Discord_Discord.js_Bots - Fatal编程技术网

Node.js 不和谐欢迎dm嵌入?

Node.js 不和谐欢迎dm嵌入?,node.js,discord,discord.js,bots,Node.js,Discord,Discord.js,Bots,我试图弄清楚如何将此代码转换为一个嵌入,在discord服务器到达时DM是一个用户 bot.on("guildMemberAdd", member => { member.send('BRUH') .catch(console.error); }) 要创建和发送嵌入文件,请执行以下操作: const examplembed=new Discord.MessageEmbed() .setColor(“#0099ff”) .setTitle(“某些标题”) .setUR

我试图弄清楚如何将此代码转换为一个嵌入,在discord服务器到达时DM是一个用户

bot.on("guildMemberAdd", member => {
    member.send('BRUH')
       .catch(console.error);
})

要创建和发送嵌入文件,请执行以下操作:

const examplembed=new Discord.MessageEmbed()
.setColor(“#0099ff”)
.setTitle(“某些标题”)
.setURL('https://discord.js.org/')
.setAuthor('某个名称','https://i.imgur.com/wSTFkRM.png', 'https://discord.js.org')
.setDescription('此处有一些描述')
.setThumbnail('https://i.imgur.com/wSTFkRM.png')
addFields先生(
{name:'Regular field title',value:'Some value here'},
{name:'\u200B',value:'\u200B'},
{name:'Inline field title',value:'Some value here',Inline:true},
{name:'Inline field title',value:'Some value here',Inline:true},
)
.addField('内联字段标题','此处有一些值',true)
.setImage('https://i.imgur.com/wSTFkRM.png')
.setTimestamp()文件
.setFooter('此处有一些页脚文本','https://i.imgur.com/wSTFkRM.png');
发送(例如嵌入);
您应该查看以下链接: