refactor: remove unused error handler

This commit is contained in:
Max Bossing 2025-08-08 08:45:24 +02:00
parent 32ae9786e1
commit 0d2c6b084c
Signed by: max
GPG key ID: E2E95E80A0C1217E

View file

@ -20,20 +20,6 @@ pub struct Data {
pub directus: DirectusClient,
}
async fn on_error(error: poise::FrameworkError<'_, Data, Error>) {
match error {
poise::FrameworkError::Setup { error, .. } => panic!("Failed to start bot: {error:?}"),
poise::FrameworkError::Command { error, ctx, .. } => {
println!("Error in command `{}`: {:?}", ctx.command().name, error,);
}
error => {
if let Err(e) = poise::builtins::on_error(error).await {
println!("Error while handling error: {e}")
}
}
}
}
#[tokio::main]
async fn main() {
let cli = Cli::parse();