mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-06-01 15:35:24 +00:00
21 lines
430 B
Kotlin
21 lines
430 B
Kotlin
package dev.inmo.tgbotapi.types
|
|
|
|
import com.soywiz.klock.DateTime
|
|
|
|
sealed class RequestError
|
|
|
|
data class RetryAfterError(
|
|
val seconds: Seconds,
|
|
val startCountingMillis: Long
|
|
) : RequestError() {
|
|
val canContinue = (seconds * 1000L) + startCountingMillis
|
|
val leftToRetry: Long
|
|
get() = canContinue - DateTime.nowUnixLong()
|
|
}
|
|
|
|
data class MigrateChatId(
|
|
val newChatId: IdChatIdentifier
|
|
) : RequestError()
|
|
|
|
|