DEV Community

Discussion on: Send automated Discord messages through Webhooks using JavaScript (Part 2 - Embeds)

Collapse
 
oskarcodes profile image
Oskar Codes

You mean taking data from an HTML form and sending that in the webhook?
Well you first have to get the raw text that is in each input of that form, and put that in the webhook payload.
For example, if you have an input on your page and want to tell the webhook to send that as the embed description, you would do it like so:

description: document.querySelector("input").value
Collapse
 
konrad_szacha_96d4d2fe379 profile image
Konrad Szacha

i dont understand it at all