mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2025-09-03 07:09:23 +00:00
add ExtendedUser
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.types
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.PrivateChat
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.extended.ExtendedPrivateChat
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.utils.PreviewFeature
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.utils.nonstrictJsonFormat
|
||||
import kotlinx.serialization.*
|
||||
import kotlinx.serialization.json.JsonObjectSerializer
|
||||
@@ -21,6 +23,9 @@ data class CommonUser(
|
||||
val languageCode: String? = null
|
||||
) : User()
|
||||
|
||||
@PreviewFeature
|
||||
typealias ExtendedUser = ExtendedPrivateChat
|
||||
|
||||
@Serializable(UserSerializer::class)
|
||||
sealed class Bot : User() {
|
||||
abstract override val username: Username
|
||||
|
@@ -1,7 +1,19 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.utils
|
||||
|
||||
@RequiresOptIn(
|
||||
"It is possible, that bevahiour of this thing will be changed later",
|
||||
"It is possible, that behaviour of this thing will be changed later",
|
||||
RequiresOptIn.Level.WARNING
|
||||
)
|
||||
@Target(
|
||||
AnnotationTarget.CLASS,
|
||||
AnnotationTarget.CONSTRUCTOR,
|
||||
AnnotationTarget.FIELD,
|
||||
AnnotationTarget.PROPERTY,
|
||||
AnnotationTarget.PROPERTY_GETTER,
|
||||
AnnotationTarget.PROPERTY_SETTER,
|
||||
AnnotationTarget.FUNCTION,
|
||||
AnnotationTarget.TYPE,
|
||||
AnnotationTarget.TYPEALIAS,
|
||||
AnnotationTarget.TYPE_PARAMETER
|
||||
)
|
||||
annotation class PreviewFeature
|
||||
|
Reference in New Issue
Block a user