refactor: remove unused error handler
This commit is contained in:
parent
32ae9786e1
commit
0d2c6b084c
1 changed files with 0 additions and 14 deletions
14
src/main.rs
14
src/main.rs
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue