Compare commits

...

2 commits

Author SHA1 Message Date
fecf977978 remove commented out code 2025-05-02 16:24:42 +02:00
149321ae10 clarify parsing error 2025-05-02 16:23:04 +02:00
2 changed files with 1 additions and 12 deletions

View file

@ -48,16 +48,6 @@ async fn on_error(error: poise::FrameworkError<'_, KBotData, CommandError>) {
error!("Error in command `{}`: {}", ctx.command().name, error,);
let _ = ctx.say("Failed to run command.".to_string()).await;
}
// poise::FrameworkError::ArgumentParse {
// error, input, ctx, ..
// } => {
// debug!(
// "Failed to parse argument `{:?}` for command `{}`: {}",
// input,
// ctx.command().name,
// error
// );
// }
error => {
if let Err(e) = poise::builtins::on_error(error).await {
error!("Error while handling error: {}", e);

View file

@ -14,7 +14,7 @@ pub enum SendTargetParseError {
ChannelError(#[from] GuildChannelParseError),
#[error("error during parsing as message")]
MessageError(#[from] MessageParseError),
#[error("failed to parse target")]
#[error("target is neither a channel, user, or message")]
Malformed,
}
@ -48,7 +48,6 @@ impl serenity::ArgumentConvert for SendTarget {
match channel_result {
Ok(channel) => return Ok(Self::Channel(Box::new(channel))),
Err(ref e) => {
tracing::error!("{:?}", e);
if let GuildChannelParseError::Http(_) = e {
channel_result?;
}