rename Error to CommandError
This commit is contained in:
parent
ef3561d86b
commit
09c828dcc3
3 changed files with 5 additions and 5 deletions
|
|
@ -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 {
|
match error {
|
||||||
poise::FrameworkError::Command { error, ctx, .. } => {
|
poise::FrameworkError::Command { error, ctx, .. } => {
|
||||||
let error = error;
|
let error = error;
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ mod send;
|
||||||
use poise::Command;
|
use poise::Command;
|
||||||
pub use send::SendTarget;
|
pub use send::SendTarget;
|
||||||
|
|
||||||
pub fn get() -> Vec<Command<KBotData, Error>> {
|
pub fn get() -> Vec<Command<KBotData, CommandError>> {
|
||||||
vec![send()]
|
vec![send()]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,9 +7,9 @@ mod commands;
|
||||||
pub mod prelude {
|
pub mod prelude {
|
||||||
pub use poise::serenity_prelude as serenity;
|
pub use poise::serenity_prelude as serenity;
|
||||||
pub struct KBotData {}
|
pub struct KBotData {}
|
||||||
pub type Error = Box<dyn std::error::Error + Send + Sync>;
|
pub type CommandError = Box<dyn std::error::Error + Send + Sync>;
|
||||||
pub type Context<'a> = poise::Context<'a, KBotData, Error>;
|
pub type Context<'a> = poise::Context<'a, KBotData, CommandError>;
|
||||||
pub type CommandResult = Result<(), Error>;
|
pub type CommandResult = Result<(), CommandError>;
|
||||||
pub use tracing::{debug, error, info, trace, warn};
|
pub use tracing::{debug, error, info, trace, warn};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue