Bot icon
Turbo Eureka Turbo Eureka#6415
Status
Prefix:
/
Owner:
Junior
Library:
slash-create
A bot for handling roles through message components on webhooks (utilizes encoded state).

Capable of supporting trigger components allowing for the assembly of complex role menus through static content hosted on GitHub. This service, and channel-backup (github.com), were designed with the intention of encouraging community contribution and collaboration. The only data collected is to standard logs when components or commands are run, which will include diagnostics on the structure of the selection and any errors that occur.

Files hosted on GitHub must be publicly readable, edit access and OAuth scopes are not required. Messages must be sent to a webhook created by this bot, otherwise it will not receive the interaction data from the components (/webhook create).

Components

All components allow Role Restrictions (&123[&456]...), requiring all roles to be present on a user before the component is usable from their perspective. Components sent in an ephemeral message will also be checked to see if the interacting user has the same roles specified - unless a component is forced to have a particular state. These are placed after all component arguments are specified, and as long as it fits within the character limit of the specified field.

btn-role and pick-role components will manage their specified group of options independently, regardless of where other duplicates may appear. In an ephemeral context, pick-role will also check what roles of it’s options a user has and set them as default - unless a component option has a forced state.

pick-msg and btn-msg currently only support GitHub targets, but there is a possibility to support other file hosts so long as the files are accessible without authentication (for now).

Examples

content: Get the news role here!
components:
  - type: 1
    components: 
      - type: 2
        label: News Role
        custom_id: "btn-role:54651843218461387"
        style: 1 # Primary

Turbo Eureka will perform minor changes to fetched payloads ensuring that a response is contained ephemerally (as well as enforcing min_values and max_values limits as needed). Please see the documentation (github.com) for better detail on its components.

Color role selection (github.com) uses btn-msg and pick-role triggers.

Active environment

TinkerStorm/community (github.com), which powers the server’s #onboarding channel, makes use of btn-msg; pick-msg and pick-role. ~/archive utilizes component state retention when Discord is sent a null field, and while that works well for ‘pages’ that’s about all it’s good for - any changes that need to be made, requires a complete clone of the base field structure (content, embeds and components).

Disclaimer: The above environment served as the foundation for the service bot you see before you, and it’s features were created around the needs of my community - although minimal in their function, there is a desire to move away from this arbitrary method of call and response.

The deployed messages utilize channel-backup as mentioned above and in the documentation for ease of use. Tools like Discohook (discohook.org) would allow you to peek into visual changes, but only supports JSON and without the presence of components. Autocode’s Embed Builder (autocode.com) can achieve a better representation, at the cost of not being able to transfer it back to JSON or YAML directly.

Notes

  • The use of ephemeral in a response payload, decides if the response should be a follow-up or edit-in-place - which differs from it’s intended purpose for slash-create.
  • Projects named Hack 'n Slash (exploring server-based custom slash commands) and Story Engine (explored interactive story telling through Discord components) serve as the basis for where this intends to go next - both were made with slash-create.