Add support for command permissions to the framework
This commit is contained in:
@@ -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>;
|
||||
}
|
||||
Reference in New Issue
Block a user