Attachment Choices for Autocomplete Options #6157
Unanswered
HayateLaTech
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.
-
This boils down to replicate the tenor & giphy in-built command behavior.
You type in a query and the application can dynamically return a list of attachments the user can pick from.
I assume the current implementation of the tenor / giphy commands are pretty stiff, considering the way they work is to display the list of attachments and once you choose a picture, it immediately submits the command and you cannot use them at all on mobile..
which might mean that it's quite hard / impossible to implement that feature in a responsive way for all platforms.
Another culprit would be how to allow devs to provide those attachments. I think the way they do it with tenor and giphy is to directly let the client pull the pics from the image hosts instead of going through the proxy.
Limiting the URLs with a whitelist would be pretty meh but a necessity to keep the users safe.
Letting the proxy handle up to 25 attachment URLs at once for one choice call would be.. fatal.
Maybe it'd be possible to limit the choice attachments to 5? 5 sounds reasonable to me and shouldn't put too much strain on discords servers / blacklist them from those CDNs, hopefully.
Once the user chooses a attachment choice, it'll replicate the already implemented attachment option display and once you click on it again, it'll show the attachment without letting the user switch it out by uploading a new one themselves but instead only lets the user remove the attachment to type in the query again. (which might be difficult making apparent UI-wise..)
Developer Implementation
Allow that the ATTACHMENT (11) type of Application Commands can be autocompleted by inputting a string.
The value of the choices array items would then contain the URL to the attachment and the name would serve as the filename (which won't be used at all perhaps?).
Beta Was this translation helpful? Give feedback.
All reactions