subcommand not working
using @sapphire/plugin-subcommands, my command doesnt respond but it registered the application command
code:
https://hasteb.in/qPcltHcGbxPjEVI
Solution:Jump to 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....
35 Replies
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)
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
this is from https://github.com/favna/musical-giggle
GitHub
GitHub - favna/musical-giggle
Contribute to favna/musical-giggle development by creating an account on GitHub.
we have the same versions
ill push my code rq then send you my repo
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.
ill look later. gonna go to bed now.
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
Did you configure an interaction endpoint for the bot by any chance?
interaction endpoint?
Other than that, that would presumably mean that no commands work
my other commands work fine
For http bots but if you have to ask then the answer is likely no
yeah no i dont
other commands work
the
public override registerApplicationCommands()
in the subcommand ran fineFolders Locations? Clean rebuilds? Just throwing some ideas out there
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
Did you delete dist when moving the file?
yes
Ok
let me try put it into another category
nope didnt work
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 @Favnahm?
do you know what the issue is
i havent had a chance to look at your repo yet and wont have so tonight
probably not before wednesday or thursday
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.
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
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.thank you
ill just remove the cooldowns for now until its fixed
<:kyuuchan_thumb:736991489300889610>
yeah, it works now
thank you so much
you're a life saver
Awesome!