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
iaqi7mo ago
No description
Favna
Favna7mo 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
iaqi7mo 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
Favna7mo ago
GitHub
GitHub - favna/musical-giggle
Contribute to favna/musical-giggle development by creating an account on GitHub.
iaqi
iaqi7mo ago
we have the same versions ill push my code rq then send you my repo
iaqi
iaqi7mo 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
Favna7mo ago
ill look later. gonna go to bed now.
iaqi
iaqi7mo 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
Favna7mo ago
Did you configure an interaction endpoint for the bot by any chance?
iaqi
iaqi7mo ago
interaction endpoint?
Favna
Favna7mo ago
Other than that, that would presumably mean that no commands work
iaqi
iaqi7mo ago
my other commands work fine
Favna
Favna7mo ago
For http bots but if you have to ask then the answer is likely no
iaqi
iaqi7mo ago
yeah no i dont
iaqi
iaqi7mo ago
No description
iaqi
iaqi7mo ago
other commands work the public override registerApplicationCommands() in the subcommand ran fine
Favna
Favna7mo ago
Folders Locations? Clean rebuilds? Just throwing some ideas out there
iaqi
iaqi7mo 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
Favna7mo ago
Did you delete dist when moving the file?
iaqi
iaqi7mo ago
yes
Favna
Favna7mo ago
Ok
iaqi
iaqi7mo ago
let me try put it into another category nope didnt work
iaqi
iaqi7mo ago
No description
iaqi
iaqi7mo 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
Favna7mo ago
hm?
iaqi
iaqi7mo ago
do you know what the issue is
Favna
Favna7mo 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
KB7mo 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
iaqi7mo 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
KB7mo 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
iaqi7mo ago
thank you ill just remove the cooldowns for now until its fixed
KB
KB7mo ago
<:kyuuchan_thumb:736991489300889610>
iaqi
iaqi7mo ago
yeah, it works now thank you so much you're a life saver
KB
KB7mo ago
Awesome!