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