Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
2 changes: 1 addition & 1 deletion docs/examples/color-roles/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
22 changes: 20 additions & 2 deletions docs/triggers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -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"
},
Expand Down