Format Values in application command options and in modals #4799
Unanswered
kingmigdor
asked this question in
API Feature Requests & Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
There are lots of bots who are using user-defined stuff for like welcome messages or so. Most bots have custom variables users can take in like
{member}
for the member name who joined the guild. I'd like to have a list of possible format values in textinputs or command arguments.For example, the bot will take a string like
"Hello, I am {member} and I am {age} years old!"
, the possible Format Values can be shown up to the user with their label.The user could give the bot a string like
"Hello, I am MEMBER and I am AGE years old!"
, where the bot would get the exact string above. This would allow more customisation and does not feel like "oh yeah it's python style haha noob" xDWhy this is needed:
When opening a modal, users normally don't have the option to go back and see which format values are possible to write in. Also, having values like that looking similar to the normal text is not a good user experience, so format values should be highlighted like a one line codeblock or something, so people understand, that this is not an option which would appear like this in their own defined text.
How it will behave:
Format Values will just be normal text on the bot's side which the bot has to replace on its own. The bot gets the
value
back from the Format Value. When the user enters the label or the value of the Format Value, it will automatically change to the style likeoption_name:
in application commands jumps to theoption_name
option.Structure:
The Format Value structure can take these arguments:
label
: the text that will show up on the user sidevalue
: the value that the bot will get so it can replace with its own argumentsrequired
: whether the format value is required in this option/textinputA list of
FormatValue
can be passed to the application command option or to the textinput. Format Values can only be used in string options (without autocomplete or choices) or textinputs, and they will show up at the place where choices would be. Maybe it can have some kind of other design so people don't get confused with the normal options and choices.Beta Was this translation helpful? Give feedback.
All reactions