From 09c828dcc3590d2077a1d6eae6b5bc111f7d949f Mon Sep 17 00:00:00 2001 From: Vilmos Zsombor TANCZOS Date: Fri, 2 May 2025 16:14:04 +0200 Subject: [PATCH] rename Error to CommandError --- src/client.rs | 2 +- src/commands.rs | 2 +- src/main.rs | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) 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}; }