Add support for command permissions to the framework

This commit is contained in:
2025-08-14 23:44:22 -03:00
parent deb76941ea
commit 208e0ddbf5
3 changed files with 29 additions and 6 deletions
+10
View File
@@ -0,0 +1,10 @@
use std::fmt::Debug;
use async_trait::async_trait;
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>;
}