Add basic moderator commands

This commit is contained in:
2025-08-23 00:02:10 -03:00
parent 8868b18be3
commit eaa38f3474
27 changed files with 752 additions and 249 deletions
+6 -6
View File
@@ -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]