mirror of
https://github.com/teloxide/teloxide.git
synced 2025-01-03 17:52:12 +01:00
Add MessageToCopyNotFound
to teloxide::errors::ApiError
. Fix https://github.com/teloxide/teloxide/issues/916
This commit is contained in:
parent
556b14eb04
commit
f76db0544f
1 changed files with 11 additions and 0 deletions
|
@ -213,6 +213,13 @@ impl_api_error! {
|
|||
/// [`DeleteMessage`]: crate::payloads::DeleteMessage
|
||||
MessageToDeleteNotFound = "Bad Request: message to delete not found",
|
||||
|
||||
/// Occurs when bot tries to copy a message which does not exists.
|
||||
/// May happen in methods:
|
||||
/// 1. [`CopyMessage`]
|
||||
///
|
||||
/// [`CopyMessage`]: crate::payloads::CopyMessage
|
||||
MessageToCopyNotFound = "Bad Request: message to copy not found",
|
||||
|
||||
/// Occurs when bot tries to send a text message without text.
|
||||
///
|
||||
/// May happen in methods:
|
||||
|
@ -822,6 +829,10 @@ mod tests {
|
|||
"{\"data\": \"Bad Request: message to delete not found\"}",
|
||||
ApiError::MessageToDeleteNotFound,
|
||||
),
|
||||
(
|
||||
"{\"data\": \"Bad Request: message to copy not found\"}",
|
||||
ApiError::MessageToCopyNotFound,
|
||||
),
|
||||
("{\"data\": \"Bad Request: message text is empty\"}", ApiError::MessageTextIsEmpty),
|
||||
("{\"data\": \"Bad Request: message can't be edited\"}", ApiError::MessageCantBeEdited),
|
||||
(
|
||||
|
|
Loading…
Reference in a new issue