#Specific Slash Commands visible to users without the permissions to use them

1 messages · Page 1 of 1 (latest)

hidden trail
#

I declared permissions on a group of command so that only people who have the permissions can use them. The commands are visible but unusable, but this isn't how it's supposed to work from what I gather from this GitHub issue: https://github.com/discord/discord-api-docs/issues/2355#issuecomment-2132147037

An example from a low ranked user in a discord who *does not have the ManageNicknames permission.

GitHub

Description Currently, slash commands are automatically visible to any user sharing a server with the interactions. My proposal is to add the ability to lock the visibility of commands (in the comm...

glossy marshBOT
#
discord/discord-api-docs

<!--
Before opening a new issue, please search existing feature requests: https://github.com/discord/discord-api-docs/issues?q=is%3Aissue+label%3A"slash+commands"+
-->

Description

Currently, slash commands are automatically visible to any user sharing a server with the interactions. My proposal is to add the ability to lock the visibility of commands (in the commands list) down to an array of role IDs or user IDs.

Why This is Needed

Currently, if you have role-spe...

State:

Closed

Comments:

23

Is Locked:

False

Labels:

slash commands

Closed By:

msciotti

Reactions:

105 👍 | 0 👎 | 0 😄 | 0 😕 | 0 ❤️ | 0 🎉 | 0 🚀 | 0 👀

hidden trail
#

Forgot to include this picture in the thread, but this is what the user gets if they try to use it

ancient hound
#

The RequireXPermissions attributes are just simple preconditions

hidden trail
#

This command is perfectly functional however

ancient hound
#

what you probably want is DefaultMemberPermissions attribute

#

this one sets the base permission required to even see the command

hidden trail
#

Alright thanks sir salute

ancient hound
hidden trail
#

@ancient hound just to confirm, I don't need the [RequiredXPermissions] thing if I have this one, right?

#

discordjs docs seem to confirm this

ancient hound
hidden trail
#

Right you need Kick perms for everything, but some also need Ban for example

ancient hound
hidden trail
#

fair

ancient hound
#

because obviously it's the bot who did it

hidden trail
#

🤖 Destroy

#

For all pratical cases, is there a single one where you would NOT want [RequireUserPermissions] to impact [DefaultMemberPermissions] ?

#

i.e. in what scenario would you have [RequireUserPermissions(GuildPermissions.KickMember)] but NOT the equivalent for DMP ?

#

(other than for easter eggs/hidden commands) wait no DMP overrides RUP if it's higher

ancient hound
hidden trail
#

But then you would also not have DMP, right ?

#

If you want a server admin to control the permissions entirely, that implies DMP as well

ancient hound
#

well i can't think of a good example rn

ancient hound
hidden trail
#

Right but a higher perm requirement from DMP will stop RUP/RGP from even being checked

#

I know they're two separate things but you get what I mean

#

So in a case where DMP >= RUP, RUP is useless