2021-03-09 13:19:15 +00:00
|
|
|
package dev.inmo.tgbotapi.types.message.ChatEvents.voice
|
|
|
|
|
2023-05-27 12:19:14 +00:00
|
|
|
import korlibs.time.TimeSpan
|
|
|
|
import korlibs.time.seconds
|
2021-03-09 13:19:15 +00:00
|
|
|
import dev.inmo.tgbotapi.types.Seconds
|
|
|
|
import dev.inmo.tgbotapi.types.durationField
|
2022-04-17 14:03:00 +00:00
|
|
|
import dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.VideoChatEvent
|
2021-03-09 13:19:15 +00:00
|
|
|
import kotlinx.serialization.SerialName
|
|
|
|
import kotlinx.serialization.Serializable
|
|
|
|
|
|
|
|
@Serializable
|
2022-04-17 14:03:00 +00:00
|
|
|
data class VideoChatEnded(
|
2021-03-09 13:19:15 +00:00
|
|
|
@SerialName(durationField)
|
|
|
|
val duration: Seconds
|
2022-04-17 14:03:00 +00:00
|
|
|
) : VideoChatEvent {
|
2021-03-09 13:19:15 +00:00
|
|
|
val timeSpan: TimeSpan
|
|
|
|
get() = TimeSpan(duration.seconds.milliseconds)
|
|
|
|
}
|