Add support for command permissions to the framework
This commit is contained in:
@@ -9,6 +9,7 @@ pub mod arguments;
|
||||
pub mod context;
|
||||
pub mod messages;
|
||||
pub mod runner;
|
||||
pub mod permissions;
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum CommandError {
|
||||
@@ -37,6 +38,9 @@ pub trait Command<T>: Send + Sync + Debug {
|
||||
fn arguments(&self) -> &'static [Argument] {
|
||||
&[]
|
||||
}
|
||||
fn permissions(&self) -> &'static [Box<dyn permissions::Permission<T> + Send + Sync>] {
|
||||
&[]
|
||||
}
|
||||
|
||||
/// Returns the command name + all its aliases.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user