style: use tabs over spaces
This commit is contained in:
parent
f2979d4cde
commit
f0550dd429
41 changed files with 1112 additions and 1109 deletions
|
@ -7,43 +7,43 @@ use poise::serenity_prelude::Timestamp;
|
|||
use poise::FrameworkError;
|
||||
|
||||
pub async fn handle(error: FrameworkError<'_, Data, Report>) {
|
||||
match error {
|
||||
FrameworkError::Setup {
|
||||
error, framework, ..
|
||||
} => {
|
||||
error!("Error setting up client! Bailing out");
|
||||
framework.shard_manager().lock().await.shutdown_all().await;
|
||||
match error {
|
||||
FrameworkError::Setup {
|
||||
error, framework, ..
|
||||
} => {
|
||||
error!("Error setting up client! Bailing out");
|
||||
framework.shard_manager().lock().await.shutdown_all().await;
|
||||
|
||||
panic!("{error}")
|
||||
}
|
||||
panic!("{error}")
|
||||
}
|
||||
|
||||
FrameworkError::Command { error, ctx } => {
|
||||
error!("Error in command {}:\n{error:?}", ctx.command().name);
|
||||
ctx.send(|c| {
|
||||
c.embed(|e| {
|
||||
e.title("Something went wrong!")
|
||||
.description("oopsie")
|
||||
.timestamp(Timestamp::now())
|
||||
.color(COLORS["red"])
|
||||
})
|
||||
})
|
||||
.await
|
||||
.ok();
|
||||
}
|
||||
FrameworkError::Command { error, ctx } => {
|
||||
error!("Error in command {}:\n{error:?}", ctx.command().name);
|
||||
ctx.send(|c| {
|
||||
c.embed(|e| {
|
||||
e.title("Something went wrong!")
|
||||
.description("oopsie")
|
||||
.timestamp(Timestamp::now())
|
||||
.color(COLORS["red"])
|
||||
})
|
||||
})
|
||||
.await
|
||||
.ok();
|
||||
}
|
||||
|
||||
FrameworkError::EventHandler {
|
||||
error,
|
||||
ctx: _,
|
||||
event,
|
||||
framework: _,
|
||||
} => {
|
||||
error!("Error while handling event {}:\n{error:?}", event.name());
|
||||
}
|
||||
FrameworkError::EventHandler {
|
||||
error,
|
||||
ctx: _,
|
||||
event,
|
||||
framework: _,
|
||||
} => {
|
||||
error!("Error while handling event {}:\n{error:?}", event.name());
|
||||
}
|
||||
|
||||
error => {
|
||||
if let Err(e) = poise::builtins::on_error(error).await {
|
||||
error!("Unhandled error occured:\n{e:#?}");
|
||||
}
|
||||
}
|
||||
}
|
||||
error => {
|
||||
if let Err(e) = poise::builtins::on_error(error).await {
|
||||
error!("Unhandled error occured:\n{e:#?}");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue