Search
Star
Feedback
Setup for Free
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Precondition Command - Sapphire - Imagine a Framework
S-IaF
Sapphire - Imagine a Framework
•
3y ago
•
6 replies
FrozenHyper
Precondition Command
In a global precondition
, is it possible to get the command object for the command the precondition is being run on
?
Solution
The command is the second parameter of the run function
. Example
:
https://github.com/sapphiredev/framework/blob/main/src/preconditions/Enabled.ts
GitHub
framework/src/preconditions/Enabled.ts at main · sapphiredev/framew...
Discord bot framework built on top of discord
.js for advanced and amazing bots
.
- sapphiredev
/framework
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
Precondition with Slash Command
S-IaF
Sapphire - Imagine a Framework / sapphire-support
3y ago
Combine Precondition and object available on the Command
S-IaF
Sapphire - Imagine a Framework / sapphire-support
3y ago
Precondition position
S-IaF
Sapphire - Imagine a Framework / sapphire-support
7mo ago
`Precondition` doubts.
S-IaF
Sapphire - Imagine a Framework / sapphire-support
11mo ago