diff --git a/src/client.rs b/src/client.rs index 54c4d19..0acd330 100644 --- a/src/client.rs +++ b/src/client.rs @@ -41,7 +41,7 @@ impl DiscordClient { } } -async fn on_error(error: poise::FrameworkError<'_, KBotData, Error>) { +async fn on_error(error: poise::FrameworkError<'_, KBotData, CommandError>) { match error { poise::FrameworkError::Command { error, ctx, .. } => { let error = error; diff --git a/src/commands.rs b/src/commands.rs index e5a5c81..9ef4e96 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -5,7 +5,7 @@ mod send; use poise::Command; pub use send::SendTarget; -pub fn get() -> Vec> { +pub fn get() -> Vec> { vec![send()] } diff --git a/src/main.rs b/src/main.rs index 743258a..c97247a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -7,9 +7,9 @@ mod commands; pub mod prelude { pub use poise::serenity_prelude as serenity; pub struct KBotData {} - pub type Error = Box; - pub type Context<'a> = poise::Context<'a, KBotData, Error>; - pub type CommandResult = Result<(), Error>; + pub type CommandError = Box; + pub type Context<'a> = poise::Context<'a, KBotData, CommandError>; + pub type CommandResult = Result<(), CommandError>; pub use tracing::{debug, error, info, trace, warn}; }