mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2025-09-05 08:09:21 +00:00
start add InputStoryContent
This commit is contained in:
@@ -0,0 +1,28 @@
|
|||||||
|
package dev.inmo.tgbotapi.types.stories
|
||||||
|
|
||||||
|
import dev.inmo.tgbotapi.requests.abstracts.MultipartFile
|
||||||
|
import dev.inmo.tgbotapi.types.photoField
|
||||||
|
import kotlinx.serialization.SerialName
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
|
sealed interface InputStoryContent {
|
||||||
|
sealed interface Type {
|
||||||
|
val name: String
|
||||||
|
}
|
||||||
|
val type : Type
|
||||||
|
val media: Pair<String, MultipartFile>
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data class Photo (
|
||||||
|
@SerialName(photoField)
|
||||||
|
val photo: MultipartFile
|
||||||
|
) : InputStoryContent {
|
||||||
|
override val type: Type
|
||||||
|
get() = Companion
|
||||||
|
|
||||||
|
companion object : Type {
|
||||||
|
override val name: String
|
||||||
|
get() = "photo"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user