0.20.2 - MessageToEditNotFoundException

This commit is contained in:
InsanusMokrassar committed 2019-12-13 23:55:06 +06:00
1 parent ac915b79f7
commit a68c31f9d1
2 files changed
+5

No files matched your search

@@ -11,6 +11,7 @@ fun newRequestException(
) = response.description ?.let { description ->
when {
description == "Bad Request: reply message not found" -> ReplyMessageNotFoundException(response, plainAnswer, message, cause)
description == "Bad Request: message to edit not found" -> MessageToEditNotFoundException(response, plainAnswer, message, cause)
description.contains("Bad Request: message is not modified") -> MessageIsNotModifiedException(response, plainAnswer, message, cause)
description == "Unauthorized" -> UnauthorizedException(response, plainAnswer, message, cause)
else -> null
@@ -38,3 +39,6 @@ class ReplyMessageNotFoundException(response: Response, plainAnswer: String, mes
class MessageIsNotModifiedException(response: Response, plainAnswer: String, message: String?, cause: Throwable?) :
RequestException(response, plainAnswer, message, cause)
class MessageToEditNotFoundException(response: Response, plainAnswer: String, message: String?, cause: Throwable?) :
RequestException(response, plainAnswer, message, cause)