subcommand not working

using @sapphire/plugin-subcommands, my command doesnt respond but it registered the application command code: https://hasteb.in/qPcltHcGbxPjEVI
Solution:
Seems to be a bug with how preconditions are enforced for subcommands? haven't tested it a ton. I added a console.log in the cooldown precondition and it seems to be consumed twice for each command run. @iaqi For now the best way to continue would be to disable your default global cooldown, or double the bucket limit....
No description
Jump to solution
35 Replies
iaqi
iaqiOP14mo ago
No description
Favna
Favna14mo ago
i copied the code 1:1 except for that I changed the impl of each method to dummy code and it works fine for me: https://hastebin.skyra.pw/baraducuri.ts If it fails after some time make sure you first defer because you need to reply to an interaction within a very short period of time (I forgot the exact amount, discord docs mention it though)
No description
iaqi
iaqiOP14mo ago
huh let me try a console.log and see if it even fires the chatInputList it doesnt fire chatInputList everything looks correct to me i dont understand why its not working can you send your package.json
Favna
Favna14mo ago
GitHub
GitHub - favna/musical-giggle
Contribute to favna/musical-giggle development by creating an account on GitHub.
iaqi
iaqiOP14mo ago
we have the same versions ill push my code rq then send you my repo
iaqi
iaqiOP14mo ago
GitHub
GitHub - nicklvh/joewy: Custom discord bot made in SapphireJS
Custom discord bot made in SapphireJS. Contribute to nicklvh/joewy development by creating an account on GitHub.
Favna
Favna14mo ago
ill look later. gonna go to bed now.
iaqi
iaqiOP14mo ago
alright goodnight btw, tested your exact code in my settingscommand.ts file and it didnt work either so it seems to be something out of that command
Favna
Favna14mo ago
Did you configure an interaction endpoint for the bot by any chance?
iaqi
iaqiOP14mo ago
interaction endpoint?
Favna
Favna14mo ago
Other than that, that would presumably mean that no commands work
iaqi
iaqiOP14mo ago
my other commands work fine
Favna
Favna14mo ago
For http bots but if you have to ask then the answer is likely no
iaqi
iaqiOP14mo ago
yeah no i dont
iaqi
iaqiOP14mo ago
No description
iaqi
iaqiOP14mo ago
other commands work the public override registerApplicationCommands() in the subcommand ran fine
Favna
Favna14mo ago
Folders Locations? Clean rebuilds? Just throwing some ideas out there
iaqi
iaqiOP14mo ago
yeah ive messed around with where the settings command is i put it in no category folder, and deleted dist folder so it would rebuild
Favna
Favna14mo ago
Did you delete dist when moving the file?
iaqi
iaqiOP14mo ago
yes
Favna
Favna14mo ago
Ok
iaqi
iaqiOP14mo ago
let me try put it into another category nope didnt work
iaqi
iaqiOP14mo ago
No description
iaqi
iaqiOP14mo ago
it seems like this works this didnt really do anything but i put import '@sapphire/plugin-subcommands/register'; at the start of my index.ts before logging into my sapphireclient no idea wtf is going on hey @Favna
Favna
Favna14mo ago
hm?
iaqi
iaqiOP14mo ago
do you know what the issue is
Favna
Favna14mo ago
i havent had a chance to look at your repo yet and wont have so tonight probably not before wednesday or thursday
Solution
KB
KB14mo ago
Seems to be a bug with how preconditions are enforced for subcommands? haven't tested it a ton. I added a console.log in the cooldown precondition and it seems to be consumed twice for each command run. @iaqi For now the best way to continue would be to disable your default global cooldown, or double the bucket limit.
No description
iaqi
iaqiOP14mo ago
so it’s something to do with cooldowns? damn thank you for telling me it’s been a whole lot of trouble shooting i’ll test it right now
KB
KB14mo ago
Yeah I don't blame you that's a sneaky one Oh yeah forgot to mention, you can see the warning if you add a listener for SubcommandPluginEvents.ChatInputSubcommandDenied and log the error.
iaqi
iaqiOP14mo ago
thank you ill just remove the cooldowns for now until its fixed
KB
KB14mo ago
<:kyuuchan_thumb:736991489300889610>
iaqi
iaqiOP14mo ago
yeah, it works now thank you so much you're a life saver
KB
KB14mo ago
Awesome!
Want results from more Discord servers?
Add your server