EmbeddReferenceError:未定义消息



所以我试图制作一个机器人,但对此一无所知。我对它做了一些研究,机器人和一切都很好,所以我试图为它做一个嵌入,我的意图是让它看起来像游戏配置文件。我在https://www.codegrepper.com/code-examples/javascript/discord.js+embed+dm上看到了一个编码表,并将其填写在我想要的布局中,但当我试图运行它时,"message.channel.send({embed: {", "ReferenceError: message is not defined"不断弹出,我的代码是

{
"content": "||__`ARCADIA`__|| 😃 ```jsnfunction foo(bar) {n  console.log(bar);n}nnfoo(1);```",
"embed": {
"title": "Profile",
"description": " ```nname```",
"url": "https://discordapp.com",
"color": 5301186,
"timestamp": "2020-08-05T22:30:42.588Z",
"footer": {
"icon_url": "https://cdn.discordapp.com/emojis/738032536462163978.png?v=1/embed/avatars/0.png",
"text": "An invitation to meet my blade"
},
"thumbnail": {
"url": "https://cdn.discordapp.com/attachments/739919002121404446/740768912857104474/698661715742556200.png"
},
"image": {
"url": "https://cdn.discordapp.com/attachments/739919002121404446/740029844926234744/Steward.Arknights.full.2929188.png"
},
"author": {
"name": "author name",
"url": "https://discordapp.com",
"icon_url": "https://cdn.discordapp.com/attachments/739919002121404446/740769663260295198/2946824.jpg"
},
"fields": [
{
"name": "Level",
"value": "100"
},
{
"name": "Zells",
"value": "1000000"
},
{
"name": "Guild",
"value": "Zen Rizor"
},
{
"name": "SPIRT",
"value": "Steward",
"inline": true
},
{
"name": "LEVEL",
"value": "26",
"inline": true
}    
]
}
}

此外,我对原始代码进行了更改

您没有在使用message变量的地方声明它,错误是.

最新更新