forked from adam/discord-bot-shtik
webhook design
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`.
|
Loading…
Reference in New Issue
Block a user