Make permissions checking and notification separate functions

This commit is contained in:
2025-08-18 23:45:52 -03:00
parent 0af585cf9e
commit cddda58aca
6 changed files with 21 additions and 21 deletions
+4
View File
@@ -7,4 +7,8 @@ use crate::framework::commands::{CommandError, context::CommandContext};
#[async_trait]
pub trait Permission<S: Send + Sync + 'static>: Debug {
async fn check(&self, ctx: &CommandContext<S>) -> Result<bool, CommandError>;
async fn on_handle_denied(&self, _ctx: &CommandContext<S>) -> Result<(), CommandError> {
Ok(())
}
}