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:
parent
d73fa4076f
commit
311512b5db
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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?
|
||||||
}
|
}
|
||||||
|
@ -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?
|
||||||
}
|
}
|
||||||
|
@ -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
|
||||||
}
|
}
|
@ -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
|
||||||
}
|
}
|
||||||
|
@ -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?
|
||||||
|
Loading…
Reference in New Issue
Block a user