Add basic moderator commands
This commit is contained in:
@@ -5,9 +5,9 @@ use deadpool_redis::{cluster::PoolError, redis::RedisError};
|
||||
use thiserror::Error;
|
||||
use twilight_http::response::DeserializeBodyError;
|
||||
|
||||
use crate::framework::{commands::{
|
||||
use crate::{database::models::{DatabaseError, DatabaseOrDiscordError}, framework::{commands::{
|
||||
arguments::Argument, context::CommandContext, permissions::Permission,
|
||||
}, runtime::Runtime};
|
||||
}, runtime::Runtime}};
|
||||
|
||||
pub mod arguments;
|
||||
pub mod context;
|
||||
@@ -18,11 +18,8 @@ pub mod runner;
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum CommandError {
|
||||
#[error("A message was attempted to be sent but it failed")]
|
||||
MessageSendingFailed,
|
||||
|
||||
#[error("A database query failed")]
|
||||
DatabaseFailed,
|
||||
DatabaseFailed(#[from] DatabaseError),
|
||||
|
||||
#[error("A database operation failed due to an inconsistent state")]
|
||||
DatabaseInconsistentState,
|
||||
@@ -41,6 +38,9 @@ pub enum CommandError {
|
||||
|
||||
#[error(transparent)]
|
||||
RedisFailed(#[from] RedisError),
|
||||
|
||||
#[error(transparent)]
|
||||
DatabaseOrDiscordError(#[from] DatabaseOrDiscordError)
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
|
||||
Reference in New Issue
Block a user