Reputation: 1
Here is what Im using sending JSON body data.
{
"reactions": [
{
"count": 1,
"me": false,
"emoji": {
"id": null,
"name": "🔥"
}
}
],
"attachments": [],
"tts": false,
"embeds": [],
"timestamp": "2017-07-11T17:27:07.299000+00:00",
"mention_everyone": false,
"id": "334385199974967042",
"pinned": false,
"edited_timestamp": null,
"author": {
"username": "Mason",
"discriminator": "9999",
"id": "53908099506183680",
"avatar": "a_bab14f271d565501444b2ca3be944b25"
},
"mention_roles": [],
"content": "Supa Hot",
"channel_id": "290926798999357250",
"mentions": [],
"type": 0
}
I only recive the image below. I dont get any embed messages or anything I only get where "Content" is located.
So in theory you need JSON body data to embed messages, I am using a program that sends POST & GET requests. Discord will only take "content" data and post it in my webhook channel. I need to embed a message using JSON data. No language here, just the JSON data, its a program that you enter the varable & data then it will send it. SO I am not using java script or anything.
Upvotes: 0
Views: 1504
Reputation: 200
You have a lot of data in your payload that is not recognized by the Discord webhook. Allowed main tags are username, avatar_url, content, embeds, tts, file. So plain text can go to content, which in your case has worked successfully. Everything more fancy needs to be in the sub-content of embeds.
The best reference, I did found so far is this one.
I also suggest to preview your JSON-code in this tool.
So reduced to what works from your example, it is only this stuff:
{
"username": "Mason",
"avatar_url": "http://your.domain.here/a_bab14f271d565501444b2ca3be944b25",
"content": "Supa Hot",
"tts": false
}
Upvotes: 1