1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-26 03:58:44 +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 package dev.inmo.tgbotapi.types.chat.abstracts
import dev.inmo.tgbotapi.types.chat.PreviewChatSerializer
import kotlinx.serialization.Serializable
@Serializable(PreviewChatSerializer::class)
interface ChannelChat : SuperPublicChat interface ChannelChat : SuperPublicChat

View File

@ -1,3 +1,7 @@
package dev.inmo.tgbotapi.types.chat.abstracts package dev.inmo.tgbotapi.types.chat.abstracts
import dev.inmo.tgbotapi.types.chat.PreviewChatSerializer
import kotlinx.serialization.Serializable
@Serializable(PreviewChatSerializer::class)
interface GroupChat : PublicChat interface GroupChat : PublicChat

View File

@ -1,5 +1,9 @@
package dev.inmo.tgbotapi.types.chat.abstracts 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 { interface PrivateChat : Chat, UsernameChat {
val firstName: String val firstName: String
val lastName: String val lastName: String

View File

@ -1,5 +1,9 @@
package dev.inmo.tgbotapi.types.chat.abstracts package dev.inmo.tgbotapi.types.chat.abstracts
import dev.inmo.tgbotapi.types.chat.PreviewChatSerializer
import kotlinx.serialization.Serializable
@Serializable(PreviewChatSerializer::class)
interface PublicChat : Chat { interface PublicChat : Chat {
val title: String val title: String
} }

View File

@ -1,3 +1,7 @@
package dev.inmo.tgbotapi.types.chat.abstracts 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 interface SuperPublicChat : PublicChat, UsernameChat

View File

@ -1,3 +1,7 @@
package dev.inmo.tgbotapi.types.chat.abstracts 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 interface SupergroupChat : GroupChat, SuperPublicChat

View File

@ -1,7 +1,10 @@
package dev.inmo.tgbotapi.types.chat.abstracts package dev.inmo.tgbotapi.types.chat.abstracts
import dev.inmo.tgbotapi.types.Username import dev.inmo.tgbotapi.types.Username
import dev.inmo.tgbotapi.types.chat.PreviewChatSerializer
import kotlinx.serialization.Serializable
@Serializable(PreviewChatSerializer::class)
interface UsernameChat : Chat { interface UsernameChat : Chat {
val username: Username? val username: Username?
} }

View File

@ -1,8 +1,11 @@
package dev.inmo.tgbotapi.types.chat.abstracts.extended package dev.inmo.tgbotapi.types.chat.abstracts.extended
import dev.inmo.tgbotapi.types.ChatId import dev.inmo.tgbotapi.types.ChatId
import dev.inmo.tgbotapi.types.chat.ExtendedChatSerializer
import dev.inmo.tgbotapi.types.chat.abstracts.ChannelChat import dev.inmo.tgbotapi.types.chat.abstracts.ChannelChat
import kotlinx.serialization.Serializable
@Serializable(ExtendedChatSerializer::class)
interface ExtendedChannelChat : ChannelChat, ExtendedPublicChat { interface ExtendedChannelChat : ChannelChat, ExtendedPublicChat {
val linkedGroupChatId: ChatId? val linkedGroupChatId: ChatId?
} }

View File

@ -1,8 +1,11 @@
package dev.inmo.tgbotapi.types.chat.abstracts.extended package dev.inmo.tgbotapi.types.chat.abstracts.extended
import dev.inmo.tgbotapi.types.chat.ChatPermissions import dev.inmo.tgbotapi.types.chat.ChatPermissions
import dev.inmo.tgbotapi.types.chat.ExtendedChatSerializer
import dev.inmo.tgbotapi.types.chat.abstracts.GroupChat import dev.inmo.tgbotapi.types.chat.abstracts.GroupChat
import kotlinx.serialization.Serializable
@Serializable(ExtendedChatSerializer::class)
interface ExtendedGroupChat : GroupChat, ExtendedPublicChat { interface ExtendedGroupChat : GroupChat, ExtendedPublicChat {
val permissions: ChatPermissions val permissions: ChatPermissions
} }

View File

@ -1,7 +1,10 @@
package dev.inmo.tgbotapi.types.chat.abstracts.extended package dev.inmo.tgbotapi.types.chat.abstracts.extended
import dev.inmo.tgbotapi.types.chat.ExtendedChatSerializer
import dev.inmo.tgbotapi.types.chat.abstracts.PrivateChat import dev.inmo.tgbotapi.types.chat.abstracts.PrivateChat
import kotlinx.serialization.Serializable
@Serializable(ExtendedChatSerializer::class)
interface ExtendedPrivateChat : PrivateChat, ExtendedChat { interface ExtendedPrivateChat : PrivateChat, ExtendedChat {
val bio: String val bio: String
} }

View File

@ -1,8 +1,11 @@
package dev.inmo.tgbotapi.types.chat.abstracts.extended package dev.inmo.tgbotapi.types.chat.abstracts.extended
import dev.inmo.tgbotapi.types.* import dev.inmo.tgbotapi.types.*
import dev.inmo.tgbotapi.types.chat.ExtendedChatSerializer
import dev.inmo.tgbotapi.types.chat.abstracts.SupergroupChat import dev.inmo.tgbotapi.types.chat.abstracts.SupergroupChat
import kotlinx.serialization.Serializable
@Serializable(ExtendedChatSerializer::class)
interface ExtendedSupergroupChat : SupergroupChat, ExtendedGroupChat { interface ExtendedSupergroupChat : SupergroupChat, ExtendedGroupChat {
val slowModeDelay: Long? val slowModeDelay: Long?
val stickerSetName: StickerSetName? val stickerSetName: StickerSetName?