clarify parsing error
This commit is contained in:
parent
09c828dcc3
commit
149321ae10
1 changed files with 1 additions and 2 deletions
|
|
@ -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("failed to parse target")]
|
#[error("target is neither a channel, user, or message")]
|
||||||
Malformed,
|
Malformed,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -48,7 +48,6 @@ 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