The precondition "SubcommandCooldown" is not available.

Hi, I have cooldowns configured on a subcommand like so, but running the command gives the title error.
Solution:
You need to register the plugin somewhere with import('@sapphire/plugin-subccommands/register') (mentioned in the readme)...
Jump to solution
14 Replies
Solution
Favna
Favna11mo ago
You need to register the plugin somewhere with import('@sapphire/plugin-subccommands/register') (mentioned in the readme)
Ravelt
RaveltOP11mo ago
Oh whoops Thanks!
Ravelt
RaveltOP11mo ago
So I'm importing it now but still getting the error
Favna
Favna11mo ago
move it to the top and make sure to rebuild TS code
kyra
kyra11mo ago
Or put the registers in your setup file
Favna
Favna11mo ago
ThisPoint
Ravelt
RaveltOP11mo ago
oh so I actually already had it being imported in my setup file
Favna
Favna11mo ago
hold on I see why ahahahah how has no one reported this before ill make a fix
Ravelt
RaveltOP11mo ago
awesome thanks!
Favna
Favna11mo ago
GitHub
fix(plugins): fixed name for plugin subcommnad cooldown preconditio...
So technically this would be a breaking change due to the rename in the constant at top level but since it never really worked before I'd say we can push it as a semver:patch. Reported in https...
Favna
Favna11mo ago
I partially blame myself and partially @kyra 🩵🩷🤍🩷🩵 coz I'm like 99% sure I wrote SubcommandCooldown before and somewhere along the line either through review or with virtual pieces it was renamed xD @Ravelt can you install @sapphire/plugin-subcommands@pr-531 and validate that it's fixed?
npm install @sapphire/plugin-subcommands@pr-531
yarn add @sapphire/plugin-subcommands@pr-531
pnpm add @sapphire/plugin-subcommands@pr-531
npm install @sapphire/plugin-subcommands@pr-531
yarn add @sapphire/plugin-subcommands@pr-531
pnpm add @sapphire/plugin-subcommands@pr-531
Ravelt
RaveltOP11mo ago
yup looks good
Favna
Favna11mo ago
nice released update #Announcements @Ravelt
Ravelt
RaveltOP11mo ago
Great thanks for the quick turnaround
Want results from more Discord servers?
Add your server