webhook design

adam 2025-05-14 15:00:36 -04:00
parent 4c9b4ff91a
commit d93f4cd060

@ -1,2 +1,47 @@
# Configured Webhook
## sample / quickstart
go to discord and create a webhook. grab that uri.
```json
"Webhooks": [
{
"uacID": "[generate a guid]",
"Trigger": "test",
"Uri": "[discord webhook uri]",
"Method": "POST",
"Headers": [
"Content-Type: application/json"
],
"Content": "{\"content\": \"Hello, this is a message from my webhook: {text}\"}"
}
```
## long version
### uacID
if any match, webhook will be called
### trigger
user has to say `!hook` to call some webhook. `!hook test` is how we call *this* webhook.
### uri
shut up you know what a uri is
### method
HTTP method. probably `POST`.
### headers
array of strings
### content
the content of what we post. but before anything, we replace.
* `{text}` - the entire text of the message following `!hook [trigger] `. so `!hook test rofl` will send `rofl`.