Compare commits
No commits in common. "fecf97797892fec2946f45b40606758159344f3b" and "09c828dcc3590d2077a1d6eae6b5bc111f7d949f" have entirely different histories.
fecf977978
...
09c828dcc3
2 changed files with 12 additions and 1 deletions
|
|
@ -48,6 +48,16 @@ async fn on_error(error: poise::FrameworkError<'_, KBotData, CommandError>) {
|
||||||
error!("Error in command `{}`: {}", ctx.command().name, error,);
|
error!("Error in command `{}`: {}", ctx.command().name, error,);
|
||||||
let _ = ctx.say("Failed to run command.".to_string()).await;
|
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 => {
|
error => {
|
||||||
if let Err(e) = poise::builtins::on_error(error).await {
|
if let Err(e) = poise::builtins::on_error(error).await {
|
||||||
error!("Error while handling error: {}", e);
|
error!("Error while handling error: {}", e);
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ pub enum SendTargetParseError {
|
||||||
ChannelError(#[from] GuildChannelParseError),
|
ChannelError(#[from] GuildChannelParseError),
|
||||||
#[error("error during parsing as message")]
|
#[error("error during parsing as message")]
|
||||||
MessageError(#[from] MessageParseError),
|
MessageError(#[from] MessageParseError),
|
||||||
#[error("target is neither a channel, user, or message")]
|
#[error("failed to parse target")]
|
||||||
Malformed,
|
Malformed,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -48,6 +48,7 @@ impl serenity::ArgumentConvert for SendTarget {
|
||||||
match channel_result {
|
match channel_result {
|
||||||
Ok(channel) => return Ok(Self::Channel(Box::new(channel))),
|
Ok(channel) => return Ok(Self::Channel(Box::new(channel))),
|
||||||
Err(ref e) => {
|
Err(ref e) => {
|
||||||
|
tracing::error!("{:?}", e);
|
||||||
if let GuildChannelParseError::Http(_) = e {
|
if let GuildChannelParseError::Http(_) = e {
|
||||||
channel_result?;
|
channel_result?;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue