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
Favna12mo ago
You need to register the plugin somewhere with import('@sapphire/plugin-subccommands/register') (mentioned in the readme)
Ravelt
RaveltOP12mo ago
Oh whoops Thanks!
Ravelt
RaveltOP12mo ago
So I'm importing it now but still getting the error
Favna
Favna12mo ago
move it to the top and make sure to rebuild TS code
kyra
kyra12mo ago
Or put the registers in your setup file
Favna
Favna12mo ago
ThisPoint
Ravelt
RaveltOP12mo ago
oh so I actually already had it being imported in my setup file
Favna
Favna12mo ago
hold on I see why ahahahah how has no one reported this before ill make a fix
Ravelt
RaveltOP12mo ago
awesome thanks!
Favna
Favna12mo 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
Favna12mo 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
RaveltOP12mo ago
yup looks good
Favna
Favna12mo ago
nice released update #Announcements @Ravelt
Ravelt
RaveltOP12mo ago
Great thanks for the quick turnaround
Want results from more Discord servers?
Add your server