Comments (1)
here's one way i've handled it in #29:
but that only really works if they're using the same parameters. i've brought it up before, but including it here for the sake of completeness: i think it'd be a good to move everything from action-name-param1-param2
to action-name:param1,param2
so that the delimiting characters are well-distinguished (see XenotropicDev/TheOracle#70)
some other ideas:
- a component to refresh/rebuild an entity embed from the DB? might not be a bad idea on the character sheet anyways, so ppl can update it without incrementing/decrementing the sheet
- including fallback options so customid interactions can collapse more gracefully if they're missing certain information. for example: if the customid for an action roll related custom id is missing info or is otherwise malformed, ephemeral prompts ask the user to set the Player Character, Stat, and Adds manually from a dropdown selection, then executes the command with that info
- these sorts of prompts could be standardized for use throughout the bot via a class/interface
- having a series of ephemeral prompts to get several parameters might be possible if we work out some means of passing the data forward to the next prompt (in the custom ID, or in an embed conveying "here's the choices you've made so far", or simply as part of message text
- another possibility (not necessarily mutually exclusive) would be falling back to embed parsing. that's not ideal, obv, but as a backup it could be handy.
- it'd also only have to happen once
- this is a long shot, but: is there a practical, programmatic way to reverse a function that transforms a value into an output string, step-by-step? or to write them in such a way that this is possible? writing a bunch of regexes isn't the end of the world,, but having it be something where the compatibility is maintained automatically would be nice.
- FWIW, i've been trying to encapsulate embed info in individual fields (for Challenge Dice, etc) in a standardized way (e.g. all things that use challenge dice a field with the same format) so that getting the data back out is a bit more reliable. it's still a work in progress tho.
- gonzo option: what if the primary means of viewing the character entity was just ephemerals? like, no particular assumption of the presence of a permanent embed, it's just something where you do
/sheet
to bring up an ephemeral with the character embed to view whenever you need it, and dismiss when you're done with it. then we don't have to worry much about maintaining component compatibility, or the display being out-of-sync with the DB entity's current state - people will pretty much always be interacting with the most up-to-date version- possible downsides: too disconnected/abstracted from "embed = character sheet" metaphor? no semi-permanent artifact of PC for display in a channel? 🤔
- tbh, this command might not be a bad idea to have anyways, just so ppl can quickly glance at their sheet without looking at a different channel... which might be a good avenue to gather feedback on whether it being the primary means of accessing a PC would work for ppl.
- long term, we might even be able to stick it in a modal or something, but that's a ways off.
from theoracle2.
Related Issues (20)
- Port/Implement Action command HOT 1
- Decide on data storage mechinism HOT 3
- write class + dictionary for challenge rank data HOT 3
- implement clocks HOT 1
- Oracle search lists the same table HOT 6
- action-pc-roll doesn't work if no buttons have been clicked yet
- Add Delete-Player command HOT 1
- advanced (post-)roll functions
- Present last used character as default HOT 1
- IWidget interface to standardize game elements with associated embeds HOT 2
- add utility methods to fake markdown that's unsupported by discord
- migrate to JSON-based resources for localization strings etc
- standardize emoji used in bot output to dictionary/DB
- associate assets with PCs, CommandVehicles, etc
- include slash command params and select menu values in log output
- remove momentum from list of rollable stats HOT 1
- Thumbnails don't work in oracle rolls HOT 1
- bug: Ask the Oracle odds are inverted
- support for oracle arrays
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from theoracle2.