-
Notifications
You must be signed in to change notification settings - Fork 139
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
Separate application commands with same name+type but in different guilds don't work #260
Comments
Implementing this would definitely be an interesting experience! |
Might as well comment here to bump it, and perhaps provide some guidance for anyone wanting to implement this. For context, I'm the main slash developer for Nextcord. In NC, we store all application commands in a dictionary, with the keys being a tuple with three values, which I call a "signature": command name, command type (slash, message, user), and guild ID ( I haven't worked with the inner workings of Disnake's application commands that much, so what I said might not be compatible at all if what you guys have setup, but just wanted to drop off what my solution to this was. |
I ran into this problem too. But I tried to create slash command and user command. |
Creating application commands with the same name but different types was fixed in v2.4.0 (#254), if you're still seeing issues on the latest version feel free to open a new issue. |
Summary
see title
Reproduction Steps
Create two commands with the same type (e.g. both slash) and same name, but with different
guild_ids
Minimal Reproducible Code
Expected Results
One command gets registered in one guild, while the other one gets registered in the other guild
Actual Results
Intents
all
System Information
latest / 2025dfb
Checklist
Additional Context
This is technically also an issue for prefix commands, although those don't really have a concept of guild-specific commands. The only thing that would emulate something like that is a
@commands.check(lambda ctx: ctx.guild.id == ...)
.The primary reason for all this is that the
InteractionBotBase.all_slash_commands
dict uses the command names as keys; fixing this would likely need a pretty large refactor, and I'm unsure how methods likeInteractionBotBase.get_slash_command
would work.thanks for the hint, alento
The text was updated successfully, but these errors were encountered: