Context menu commands not being registered
Hi, on updating to v4 I experienced the following error:
I imagined this might be caused by the migration, so I deleted the application command and removed the idHints, but now the context menu won't even register at all. I'm not getting any error or output in the console using the following code:
Has there been a change I'm missing here?
22 Replies
A.......what
do you register the command elsewhere too
I think this is related too
https://discord.com/channels/737141877803057244/1062361081303007282
This is very interesting, I have two context menu commands in my application.
If I delete the other one as well, I can then create both of them on the next restart:
However, if I then add the idHints and restart again, I get the error back:
Interesting that if I remove Banish, but keep Report I don't get an error for Report.
Can youuu get me a small repro sample
when you've got time
i'll take a look
Alright, interestingly it only seems to happen when you're registering multiple context menus.
Here's the simplest repro I've found:
1) Start with no context menus
2) Register two at the same time
3) Restart
4) Add the idHints
5) Restart
Looking at the error message, it starts with
ApplicationCommandRegistry[report]
but the error is actually to do with the Banish context menu.if it starts with that header its forthat registry but thats confusing
did u pass in the wrong ids
Nope right ids.
Just recreated in v3 and it works fine.
o.o
yeah pls make a repo with the repro
I don't know if it's also causing people not to receive context menu interactions in https://discord.com/channels/737141877803057244/1062361081303007282
Wdym?
GitHub
Build software better, together
GitHub is where people build software. More than 94 million people use GitHub to discover, fork, and contribute to over 330 million projects.
So you can checkout and run it straight away? Or do you just want to see the surrounding code?
oh i think i already found the bug
LOL
oh ffs
Such a small bug
Will PR a fix, are you available to test it?
Yea
fyi @Favna we'll need a patch release soon
@Fozzie
npm install @sapphire/framework@pr-590
I dont think I've spotted a bug this fast in my lifeSeems to work fine now! Also seems to work when registering them independently as well.
Thanks for your help 😉
ty for the report
Solution
we'll hopefully get this out this week
You'll get there eventually