Enabling/Disabling global commands per guild #4795
Unanswered
Zoddo
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.
Uh oh!
There was an error while loading. Please reload this page.
-
A nice addition in parallel to Application Commands Permissions v2 would be the ability to completely disable a global command per guild.
Why is this needed?
I see a few cases where applications would want to control commands availability in a guild:
Why not use commands permissions?
Application Commands permissions aren't the optimal solutions for these use cases, because :
Why not use guild commands for commands that need to be disabled?
Guild commands may sound like a solution at first glance, but this won't scale. If you need to update a command (which may happen even more often than currently with the upcoming release of commands localization), you will now have to iterate over potentially thousands of guilds, if not more, to make this update. This defeats the purpose of global commands.
How this may be implemented?
A simple boolean is probably enough.
For example,
PATCH /applications/{application.id}/guilds/{guild.id}/commands/{command.id}
may accept anenabled: false
property when provided a global command ID. Adefault_enabled
property on the global command definition may also be nice to register commands that should be disabled by default.This should be accessible with a bot token (or client credential token with
applications.commands.update
scope), like for creating and deleting application commands.UI-wise, a disabled command should be hidden from the "selector" in the chat input. I believe it should also be hidden from the Integrations page in the server settings (like if the command didn't exist). This would help to declutter the list of commands, especially with multipurpose bots.
Beta Was this translation helpful? Give feedback.
All reactions