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

Context menu commands can't be used without Send Messages permission #6761

Open
Luc1412 opened this issue Mar 27, 2024 · 7 comments
Open

Context menu commands can't be used without Send Messages permission #6761

Luc1412 opened this issue Mar 27, 2024 · 7 comments

Comments

@Luc1412
Copy link

Luc1412 commented Mar 27, 2024

Description

It seems like since the backend support for user commands had been added, context menus doesn't work if the user got no send messages permission.

I think these commands should at least work, when the response is ephemeral.

In our case we got a feedback system, where users fill modals with there feedback and webhooks post it, so the users itself got no write perms. However they should be able to report feedback trough context menus, which doesn't work now.

Steps to Reproduce

  1. Setup a Context menu command
  2. Setup a channel where a user can't send messages, but can use app commands
  3. Execute the command as the user with no write permission

Expected Behavior

The command will be normally (ephemerally) executed

Current Behavior

The command can be used, however an "Missing Permission" error appears:
image

Also after switching the channel and going bac, the messages changes from "Missing Permissions" to "The application did not respond":
image

Screenshots/Videos

No response

Client and System Information

ptb 279006 (1671f3f) Host 1.0.1062 x64 (45361) Windows 11 64-bit (10.0.22631)

@Auralytical
Copy link
Contributor

Hey! Just a few questions to better understand this:

  • Is the application you're using installed to the server or to your users? (docs)
  • Was this working in your server before and broke, or is this more of a feature request?

I see the frontend has a couple bugs reported here where it's letting you try to run commands that will fail due to permission checks, and changing channels is losing the reason for it failing, but I want to double check if there was a recent backend breakage in here too.

@advaith1
Copy link
Contributor

context menu commands are supposed to not work without Send Messages, except user-installed commands, which are forced ephemeral. They worked for guild-installed commands for a short while (few weeks?) but this was considered a security issue, as it could create public messages in read-only channels, and was blocked in the backend last week as a bug fix.

@Luc1412
Copy link
Author

Luc1412 commented Mar 28, 2024

Is the application you're using installed to the server or to your users?

This is a good old classic server app.

Was this working in your server before and broke, or is this more of a feature request?

I think I never tested it myself, however another dev that contributed to the bot told me it was working fine.

as it could create public messages in read-only channels

As long the context menu is ephemeral only, it should be fine too. This could also be forced, instead of letting it fail with an error message,

@sklein12
Copy link

sklein12 commented Apr 1, 2024

As many of you have mentioned this is is a feature request to force guild apps responses to be ephemeral. I've updated the issue to reflect that. This is something we've actually decided against doing because it would be considered a breaking change.

We could potentially look at other ways of doing this in the future so I'm going to leave this open as a feature request.

@ptlthg
Copy link

ptlthg commented Apr 7, 2024

My server has a custom context menu command to report messages to staff members of the server, just today members were confused why they couldn't report messages in our #welcome channel.

I would appreciate some sort of change that would allow ephemeral responses to be possible, as it's confusing that the app command is available to be used there, but doesn't work and just errors out.

@adequately
Copy link

As many of you have mentioned this is is a feature request to force guild apps responses to be ephemeral. I've updated the issue to reflect that. This is something we've actually decided against doing because it would be considered a breaking change.

We could potentially look at other ways of doing this in the future so I'm going to leave this open as a feature request.

The inherent usage here is we want to allow individuals to run ephemeral context menu commands in read-only channels.

For example, an individual wants to implement a context menu command that allows a user to translate a message and have it ephemerally given back to the user in the same channel. Hope to see this problem solved in the future!

@advaith1
Copy link
Contributor

This works for user-installed commands now, but it is intentionally disabled for guild-installed commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants