diff --git a/docs/README.md b/docs/README.md index ea2b8d8..eff9d95 100644 --- a/docs/README.md +++ b/docs/README.md @@ -8,3 +8,11 @@ - [Triggers](./triggers#readme) - Examples - [Color Roles](./examples/color-roles#readme) + +## Notes + +- All messages must follow Discord's message constrains, which can be found [here](https://discord.com/developers/docs/resources/channel#embed-limits). + +## Invite + +The public deployment of this bot can be invited to your server using [this link](https://discord.com/api/oauth2/authorize?client_id=1041078465274847312&permissions=275683526656&scope=applications.commands%20bot). diff --git a/docs/examples/color-roles/README.md b/docs/examples/color-roles/README.md index 3a52fdc..46ad8dc 100644 --- a/docs/examples/color-roles/README.md +++ b/docs/examples/color-roles/README.md @@ -12,7 +12,7 @@ There are a few options for setting up this example. > If a webhook is used, it must be owned by the application that will be used to respond to the components. -1. Use a request sandbox like [Postman](https://www.postman.com/) to send the `prompt.yaml` (with the request body encoded as JSON) to the channel. +1. Use a request sandbox like [Postman](https://www.postman.com/) or [Insomnia](https://insomnia.rest/) to send the `prompt.yaml` (with the request body encoded as JSON) to the channel. 2. Use [channel-backup](https://github.com/TinkerStorm/channel-backup) to send the content as is, using the webhook provided. 3. Use a bot token in a request sandbox (see `1.`). > This will require use of your own application and bot user. Please refer to the [Discord Developer Portal](https://discord.dev) for more information. diff --git a/docs/triggers/README.md b/docs/triggers/README.md index 3a57fa3..443c14f 100644 --- a/docs/triggers/README.md +++ b/docs/triggers/README.md @@ -4,6 +4,7 @@ > - Selection labels, descriptions and values have their own limits of 100 characters each. > - The client may not show all characters in a selection label or description, but the server will still receive them. +- [Any Component - `dud`](./dud.md) - Button Interactions - `btn-*` - [Button Message](./btn-msg.md) - [Button Role](./btn-role.md) @@ -21,12 +22,29 @@ The roles that are allowed to use this trigger. -#### Notes +### Notes -- If no roles are specified, then anyone can use the given trigger. +- If no restrictions are specified, then anyone can use the given trigger. - The service does not check for the existence of the roles, so if a role is specified that does not exist, then the trigger will not work for anyone. - Specifying the literal of `null` on `content`, `embeds` or `components` will allow content of that field to be carried over from the original message. ## General Notes +- [`custom_id`](https://discord.dev/interactions/message-components#custom-id) is restricted to 100 characters per component, including the initial trigger. - If sent after triggering a `*-msg` component, inaccessible components defined by the [restrictions](#role-restrictions) are disabled before sending. +- `*-msg` component values must be pointed to a publicly accessible file. + +### Component notes + +- [Button Component Structure](https://discord.dev/interactions/message-components#button-object-button-structure) + - `label` - 80 characters + - `style` - 1 to 4 (or 5 for link) +- [Select Component Structure](https://discord.dev/interactions/message-components#select-menu-object-select-menu-structure) + - `placeholder` - 150 characters + - `min_values` & `max_values` - 1 to 25 + > If `max_values` is not set, Discord will default to 1. + > If they overlap, the bot will throw an error. + - `options` - List / Array (max 25) + - `label` - 100 characters + - `value` - 100 characters + - `description` - 100 characters diff --git a/package.json b/package.json index ebc31cd..7c95b14 100644 --- a/package.json +++ b/package.json @@ -1,13 +1,13 @@ { - "name": "slash-create-template", + "name": "turbo-eureka", "version": "1.0.0", - "description": "A template for slash-create", + "description": "A bot for handling roles through message components on webhooks (utilizes encoded state).", "main": "dist/index.js", "scripts": { "sync": "slash-up sync", "sync:dev": "slash-up sync -e development", "start": "cd dist && node index.js", - "build": "npx tsc", + "build": "npx rimraf ./dist && npx tsc", "lint": "npx eslint --ext .ts ./src", "lint:fix": "npx eslint --ext .ts ./src --fix" },