From 1c0684faa1f1a8d36fe57294fcb6e180c622c259 Mon Sep 17 00:00:00 2001 From: Hassan Abouelela <47495861+HassanAbouelela@users.noreply.github.com> Date: Tue, 22 Dec 2020 04:25:25 +0300 Subject: Dedents Webhook Object Removes the meta object, and moves the webhook object under the main form object to reduce nesting. Signed-off-by: Hassan Abouelela <47495861+HassanAbouelela@users.noreply.github.com> --- SCHEMA.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'SCHEMA.md') diff --git a/SCHEMA.md b/SCHEMA.md index fa5f247..c3edf35 100644 --- a/SCHEMA.md +++ b/SCHEMA.md @@ -16,10 +16,10 @@ In this document: | ------------- | ----------------------------------------- | ----------------------------------------------------------------------------------------- | ---------------------------------------- | | `id` | Unique identifier | A user selected, unique, descriptive identifier (used in URL routes, so no spaces) | `"ban-appeals"` | | `features` | List of [form features](#form-features) | A list of features to change the behaviour of the form, described in the features section | `["OPEN", "COLLECT_EMAIL"]` | -| `meta` | Mapping of [meta options](#meta-options) | Meta properties for the form. | See meta-options section | | `questions` | List of [form questions](#form-question) | The list of questions to render on a specific form | Too long! See below | | `name` | String | Name of the form | `"Summer Code Jam 2100"` | | `description` | String | Form description | `"This is my amazing form description."` | +| `webhook` | [Webhook object](#webhooks) | An optional discord webhook. | See webhook documentation. | ### Form features @@ -32,10 +32,13 @@ In this document: | `DISABLE_ANTISPAM` | Disable the anti-spam checks from running on a form submission. | | `WEBHOOK_ENABLED` | The form should notify the webhook. Has no effect if no webhook is set. | -### Meta options -| Field | Description | Example | -| --------- | ---------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ | -| `webhook` | Mapping of webhook url and message. Message can use certain [context variables](#webhook-variables). | `"webhook": {"url": "https://discord.com/api/webhooks/id/key", "message": "{user} submitted a form."}` | +### Webhooks +Discord webhooks to send information upon form submission. + +| Field | Type | Description | +| ----------| ------ | --------------------------------------------------------------------------------------------------------- | +| `url` | String | Discord webhook URL. | +| `message` | String | An optional message to include before the embed. Can use certain [context variables](#webhook-variables). | #### Webhook Variables -- cgit v1.2.3