These are the files we use to post embeds using webhooks in the ChromeOS Discord Server. Here's an example:
- Download the Postman web app for your operating system
- Install it and sign in.
- You'll see a modal pop up with options like this:
just hit the "x" icon to close out of this.
- At the top you should see a "+" icon to create a new request. Click on that.
- Change the request type from GET to POST, and insert the URL of the webhook in the text box next to it. (You can get the URL for an existing webhook by going to the channel settings > Webhooks > Edit > Webhook URL, or if you want you can create a new webhook in the same menu)
- Go into the "headers" subsection. Add a new key "Content-Type" and set the value to "application/json"
- In the "body" subsection, set the type to "raw" and then in the large text box insert the JSON you would like to send. Note that this format needs to comply by the Discord API conventions for webhooks.
- When you're ready, hit the big blue "Send" and if all went well, it should appear in the channel you created the webhook for. If not, you should see an error response saying what went wrong.
Where possible, just take example from some of the existting JSON files. But if there's something you don't see that you'd like to try to do, use the Discord API documentation to figure out how to write it
You can preview your embed in a test server by using a webhook URL from a channel where you want to send it, or alternatively you can use the Discord embed visualiser tool, which updates in real time and therfore less annoying to work with. Note that if you use this you'll have to reformat your JSON slightly, in that you just want to copy a single embed object over from the array "embeds", as this preview tool uses the bot embed format rather than webhook format.