Search
Star
Feedback
Setup for Free
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Subcommand error questions - Sapphire - Imagine a Framework
S-IaF
Sapphire - Imagine a Framework
•
9mo ago
•
15 replies
čamdžić
Subcommand error questions
Hello
, I have only
messageCommandDenied
messageCommandDenied
listener where I handle precondition errors
. But
, when subcommand fails it also shares that listener even tho there is specific listener for that
. Probably a bug you should look into
Solution
The plugin does not overwrite the default command handling
(like you did before by overwriting the listener
) and the subcommand denied error is thrown at a completely different stage in the processing of the command
:
https://github.com/sapphiredev/plugins/blob/6664087e0b419adcd9ce9411148793e131dd7c3d/packages/subcommands/src/lib/Subcommand.ts#L437
as opposed to
https://github.com/sapphiredev/framework/blob/b1fa79bad64e0a17eadd6db2d77fe14eb77c87f7/src/optional-listeners/message-command-listeners/CorePreMessageCommandRun.ts#L15
Jump to solution
Sapphire - Imagine a Framework
Join
Sapphire is a next-gen object-oriented Discord.js bot framework.
2,261
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Recent Announcements
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
subcommand
S-IaF
Sapphire - Imagine a Framework / sapphire-support
3y ago
Subcommand Inquiry
S-IaF
Sapphire - Imagine a Framework / sapphire-support
9mo ago
Subcommand groups
S-IaF
Sapphire - Imagine a Framework / sapphire-support
2y ago
Subcommand Aliases
S-IaF
Sapphire - Imagine a Framework / sapphire-support
2y ago