mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-26 03:58:44 +00:00
WrongFileIdentifierException
This commit is contained in:
parent
f0e9267664
commit
d048958423
@ -33,6 +33,7 @@
|
|||||||
* New dice type `SlotMachineDiceAnimationType`
|
* New dice type `SlotMachineDiceAnimationType`
|
||||||
* New extension `TelegramMediaFile#asDocumentFile`
|
* New extension `TelegramMediaFile#asDocumentFile`
|
||||||
* New extension `VideoFile#toInputMediaVideo`
|
* New extension `VideoFile#toInputMediaVideo`
|
||||||
|
* New exteption `WrongFileIdentifierException`
|
||||||
* `API`:
|
* `API`:
|
||||||
* New extensions for media groups:
|
* New extensions for media groups:
|
||||||
* `TelegramBot#sendPlaylist`
|
* `TelegramBot#sendPlaylist`
|
||||||
|
@ -15,6 +15,7 @@ fun newRequestException(
|
|||||||
description.contains("Bad Request: message is not modified") -> MessageIsNotModifiedException(response, plainAnswer, message, cause)
|
description.contains("Bad Request: message is not modified") -> MessageIsNotModifiedException(response, plainAnswer, message, cause)
|
||||||
description == "Unauthorized" -> UnauthorizedException(response, plainAnswer, message, cause)
|
description == "Unauthorized" -> UnauthorizedException(response, plainAnswer, message, cause)
|
||||||
description.contains("PHOTO_INVALID_DIMENSIONS") -> InvalidPhotoDimensionsException(response, plainAnswer, message, cause)
|
description.contains("PHOTO_INVALID_DIMENSIONS") -> InvalidPhotoDimensionsException(response, plainAnswer, message, cause)
|
||||||
|
description.contains("wrong file identifier") -> WrongFileIdentifierException(response, plainAnswer, message, cause)
|
||||||
else -> null
|
else -> null
|
||||||
}
|
}
|
||||||
} ?: CommonRequestException(response, plainAnswer, message, cause)
|
} ?: CommonRequestException(response, plainAnswer, message, cause)
|
||||||
@ -45,3 +46,6 @@ class MessageToEditNotFoundException(response: Response, plainAnswer: String, me
|
|||||||
|
|
||||||
class InvalidPhotoDimensionsException(response: Response, plainAnswer: String, message: String?, cause: Throwable?) :
|
class InvalidPhotoDimensionsException(response: Response, plainAnswer: String, message: String?, cause: Throwable?) :
|
||||||
RequestException(response, plainAnswer, message, cause)
|
RequestException(response, plainAnswer, message, cause)
|
||||||
|
|
||||||
|
class WrongFileIdentifierException(response: Response, plainAnswer: String, message: String?, cause: Throwable?) :
|
||||||
|
RequestException(response, plainAnswer, message, cause)
|
||||||
|
Loading…
Reference in New Issue
Block a user