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