-
Notifications
You must be signed in to change notification settings - Fork 187
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
Subcommands are registered to guilds where there are not allowed #88
Comments
I need to fix this ASAP. And I think, I can do it by fixing |
This happens due to merging subcommands to one command add body when requesting to API. If possible, fixing this will require complete redesign of auto-registering. |
@eunwoo1104 after few hours of digging I realized that this really needs a complete redesign of the current merging. There are many corner cases, for example:
So anytime there is guild subcommand/subgroup and global subcommand/subgroup you have to split the command into several: a command with a global subcommand + guild specific sub command and repeat that for allow guild commands. It increases the number of requests and memory usage with the current implementation exponentially. Also, it's unclear what Discord will do with guild commands and permissions model in general. |
I still prefer this issue to stay open just for other members to be aware of it. It maybe makes sense to add a warning to not use different guild ids for subcommands. |
I've been thinking about this and there's even more problems when you take into consideration that commands in different guilds could also have different descriptions, options, etc. This is not going to be a simple fix, possibly requiring a rewrite of how commands are created by the user. |
This should be fixed and will be included at next release. |
Is there already a solution for permissions to register subcommands? |
Lack of permissions for subcommands are an API limitation, we have no control over that. I suggest hard coding conditionals in your subcommand declarations for handling this. |
I've noticed that when I use
guild_ids
on a subcommand for a command which is shared between multiple guilds, that subcommand is registered to all guilds where one of its subcommands is allowed.Steps
s1
for commandc
for Guild A:s2
for commandc
for Guild B:Expected behavior
Guild A has
/c s1
command only and Guild B has/c s2
command only.Actual behavior
Guild A has
/c s1
and/c s2
but only can use/c s1
, and Guild B has/c s1
and/c s2
but only can use/c s2
.The text was updated successfully, but these errors were encountered: