mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-12-23 00:57:13 +00:00
fix chat interfaces serializers
This commit is contained in:
parent
d73fa4076f
commit
311512b5db
@ -1,3 +1,7 @@
|
||||
package dev.inmo.tgbotapi.types.chat.abstracts
|
||||
|
||||
import dev.inmo.tgbotapi.types.chat.PreviewChatSerializer
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@Serializable(PreviewChatSerializer::class)
|
||||
interface ChannelChat : SuperPublicChat
|
||||
|
@ -1,3 +1,7 @@
|
||||
package dev.inmo.tgbotapi.types.chat.abstracts
|
||||
|
||||
import dev.inmo.tgbotapi.types.chat.PreviewChatSerializer
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@Serializable(PreviewChatSerializer::class)
|
||||
interface GroupChat : PublicChat
|
||||
|
@ -1,5 +1,9 @@
|
||||
package dev.inmo.tgbotapi.types.chat.abstracts
|
||||
|
||||
import dev.inmo.tgbotapi.types.chat.PreviewChatSerializer
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@Serializable(PreviewChatSerializer::class)
|
||||
interface PrivateChat : Chat, UsernameChat {
|
||||
val firstName: String
|
||||
val lastName: String
|
||||
|
@ -1,5 +1,9 @@
|
||||
package dev.inmo.tgbotapi.types.chat.abstracts
|
||||
|
||||
import dev.inmo.tgbotapi.types.chat.PreviewChatSerializer
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@Serializable(PreviewChatSerializer::class)
|
||||
interface PublicChat : Chat {
|
||||
val title: String
|
||||
}
|
||||
|
@ -1,3 +1,7 @@
|
||||
package dev.inmo.tgbotapi.types.chat.abstracts
|
||||
|
||||
import dev.inmo.tgbotapi.types.chat.PreviewChatSerializer
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@Serializable(PreviewChatSerializer::class)
|
||||
interface SuperPublicChat : PublicChat, UsernameChat
|
||||
|
@ -1,3 +1,7 @@
|
||||
package dev.inmo.tgbotapi.types.chat.abstracts
|
||||
|
||||
import dev.inmo.tgbotapi.types.chat.PreviewChatSerializer
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@Serializable(PreviewChatSerializer::class)
|
||||
interface SupergroupChat : GroupChat, SuperPublicChat
|
||||
|
@ -1,7 +1,10 @@
|
||||
package dev.inmo.tgbotapi.types.chat.abstracts
|
||||
|
||||
import dev.inmo.tgbotapi.types.Username
|
||||
import dev.inmo.tgbotapi.types.chat.PreviewChatSerializer
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@Serializable(PreviewChatSerializer::class)
|
||||
interface UsernameChat : Chat {
|
||||
val username: Username?
|
||||
}
|
||||
|
@ -1,8 +1,11 @@
|
||||
package dev.inmo.tgbotapi.types.chat.abstracts.extended
|
||||
|
||||
import dev.inmo.tgbotapi.types.ChatId
|
||||
import dev.inmo.tgbotapi.types.chat.ExtendedChatSerializer
|
||||
import dev.inmo.tgbotapi.types.chat.abstracts.ChannelChat
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@Serializable(ExtendedChatSerializer::class)
|
||||
interface ExtendedChannelChat : ChannelChat, ExtendedPublicChat {
|
||||
val linkedGroupChatId: ChatId?
|
||||
}
|
||||
|
@ -1,8 +1,11 @@
|
||||
package dev.inmo.tgbotapi.types.chat.abstracts.extended
|
||||
|
||||
import dev.inmo.tgbotapi.types.chat.ChatPermissions
|
||||
import dev.inmo.tgbotapi.types.chat.ExtendedChatSerializer
|
||||
import dev.inmo.tgbotapi.types.chat.abstracts.GroupChat
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@Serializable(ExtendedChatSerializer::class)
|
||||
interface ExtendedGroupChat : GroupChat, ExtendedPublicChat {
|
||||
val permissions: ChatPermissions
|
||||
}
|
@ -1,7 +1,10 @@
|
||||
package dev.inmo.tgbotapi.types.chat.abstracts.extended
|
||||
|
||||
import dev.inmo.tgbotapi.types.chat.ExtendedChatSerializer
|
||||
import dev.inmo.tgbotapi.types.chat.abstracts.PrivateChat
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@Serializable(ExtendedChatSerializer::class)
|
||||
interface ExtendedPrivateChat : PrivateChat, ExtendedChat {
|
||||
val bio: String
|
||||
}
|
||||
|
@ -1,8 +1,11 @@
|
||||
package dev.inmo.tgbotapi.types.chat.abstracts.extended
|
||||
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.types.chat.ExtendedChatSerializer
|
||||
import dev.inmo.tgbotapi.types.chat.abstracts.SupergroupChat
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@Serializable(ExtendedChatSerializer::class)
|
||||
interface ExtendedSupergroupChat : SupergroupChat, ExtendedGroupChat {
|
||||
val slowModeDelay: Long?
|
||||
val stickerSetName: StickerSetName?
|
||||
|
Loading…
Reference in New Issue
Block a user