Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow users to invoke slash commands when uploading an attachment #2322

Closed
xSke opened this issue Dec 16, 2020 · 14 comments
Closed

Allow users to invoke slash commands when uploading an attachment #2322

xSke opened this issue Dec 16, 2020 · 14 comments
Labels
slash commands synced Synced to internal tracker

Comments

@xSke
Copy link

xSke commented Dec 16, 2020

Description
Unsure if this counts as a feature request or a bug report, but currently you can't use slash commands within the attachment sending modal.

Normally you can submit a message using the "ADD A COMMENT" text field, and with "standard" message-based bot commands, this allows you to invoke commands including an image.

Why This is Needed
A lot of bots have commands that operate on images. For example, the !addemoji command in Carl-bot, which will upload an image attached to the command trigger message as an emoji.

Alternatives Considered
The alternative would be not supporting this, I suppose, but that would be a downgrade from current command behavior. Alternatively, taking an "attachment" argument type, somehow, which would make it explicit and named on the client end?

Additional Details

@yourWaifu
Copy link
Contributor

I have a few people requesting me to add this to my library. Rendering an image and sanding it seems to be the common use case.

@msciotti msciotti added planned We're going to fix this pretty soon synced Synced to internal tracker labels Jan 15, 2021
@msciotti
Copy link
Contributor

We will support attachments on non-ephemeral responses. Currently scoping the backend work required to do so.

We can't support attachments on ephemeral responses right now due to architecture problems similar to embeds: #2318 (comment)

@Skye-31
Copy link

Skye-31 commented Jan 15, 2021

This feature request appears to be asking for users to be able to send attachments to the bot in slash commands, not vice versa (though that should be added too)

@xSke
Copy link
Author

xSke commented Jan 15, 2021

Yes, this issue is about invoking commands and including attachments as arguments one way another.

Something similar to this flow with "standard" bot commands;
image

@msciotti
Copy link
Contributor

Oh I apologize. I guess I was caught up in the title wording + another use case. That's...tricky. I'm not sure if we can support this in this version (and may want to instead support future versions having an attachment type argument)

@msciotti msciotti changed the title Allow attachments on slash command invocations Allow users to invoke slash commands when uploading an attachment Jan 19, 2021
@msciotti msciotti removed the planned We're going to fix this pretty soon label Jan 19, 2021
@xSke
Copy link
Author

xSke commented Jan 19, 2021

Yeah, an attachment argument type would solve it too. Any way of providing a relevant file/image when executing a command would work, "slash commands in the attachment box" is just what most closely mirrors current solutions.

#2504 could work as a stopgap solution until then?

@k9lego
Copy link

k9lego commented Jan 19, 2021

Yeah, an attachment argument type would solve it too. Any way of providing a relevant file/image when executing a command would work, "slash commands in the attachment box" is just what most closely mirrors current solutions.

#2504 could work as a stopgap solution until then?

Yeah I think an attachment argument would be best IMO, it could accept a URL or pop-up a drop-box or something similar like that.

@castdrian
Copy link

Yeah, an attachment argument type would solve it too. Any way of providing a relevant file/image when executing a command would work, "slash commands in the attachment box" is just what most closely mirrors current solutions.

#2504 could work as a stopgap solution until then?

Yeah I think an attachment argument would be best IMO, it could accept a URL or pop-up a drop-box or something similar like that.

For URLs it should be a different type then, bc URLs aren't attachments uploaded via the client. It should be it's own url type then

@Chinoman10
Copy link

Using URL's is what I've done as a workaround.
People upload images/files first, and then they have to copy the Discord's CDN url and provide it as an argument.

@msciotti
Copy link
Contributor

msciotti commented Mar 3, 2021

I think y'all have it right here that an attachment argument type is the way to go. Trying to stack autocomplete inside that modal would be a nightmare (and isn't how it even works on mobile). That type won't make our V1 release but we know it's necessary 👍

@DetachHead
Copy link

but we know it's necessary 👍

how come this was closed if it's a necessity that you guys intend to add in the future?

@APixelVisuals
Copy link

APixelVisuals commented Aug 7, 2021

but we know it's necessary 👍

how come this was closed if it's a necessity that you guys intend to add in the future?

It's listed in #3581

@hahahaha-j
Copy link

Especially if you are trying to get the url from the image uploaded, because message.content blew up. Slash commands don't support images.

@arHSM
Copy link
Contributor

arHSM commented Dec 20, 2021

Slash commands will support attachments soon fyi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
slash commands synced Synced to internal tracker
Projects
None yet
Development

No branches or pull requests