1
0
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:
InsanusMokrassar 2020-11-07 01:34:22 +06:00
parent d73fa4076f
commit 311512b5db
11 changed files with 39 additions and 0 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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
}

View File

@ -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

View File

@ -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

View File

@ -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?
}

View File

@ -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?
}

View File

@ -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
}

View File

@ -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
}

View File

@ -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?