mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2025-09-16 13:49:26 +00:00
add excluding of impls
This commit is contained in:
@@ -49,7 +49,7 @@ sealed interface AbleToAddInAttachmentMenuChat : Chat {
|
||||
}
|
||||
|
||||
@Serializable(PreviewChatSerializer::class)
|
||||
@ClassCastsIncluded
|
||||
@ClassCastsIncluded(excludeRegex = ".*Impl.kt")
|
||||
sealed interface Chat {
|
||||
val id: IdChatIdentifier
|
||||
}
|
||||
|
@@ -3,11 +3,13 @@ package dev.inmo.tgbotapi.types.chat
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.Message
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.TelegramBotAPIMessageDeserializeOnlySerializer
|
||||
import dev.inmo.tgbotapi.utils.RiskFeature
|
||||
import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.json.JsonObject
|
||||
|
||||
@Serializable
|
||||
@RiskFeature("This class is a subject of changes. It is better to use ExtendedChannelChat due")
|
||||
data class ExtendedChannelChatImpl(
|
||||
@SerialName(idField)
|
||||
override val id: ChatId,
|
||||
@@ -33,6 +35,7 @@ data class ExtendedChannelChatImpl(
|
||||
) : ExtendedChannelChat
|
||||
|
||||
@Serializable
|
||||
@RiskFeature("This class is a subject of changes. It is better to use ExtendedGroupChat due")
|
||||
data class ExtendedGroupChatImpl(
|
||||
@SerialName(idField)
|
||||
override val id: ChatId,
|
||||
@@ -54,6 +57,7 @@ data class ExtendedGroupChatImpl(
|
||||
) : ExtendedGroupChat
|
||||
|
||||
@Serializable
|
||||
@RiskFeature("This class is a subject of changes. It is better to use ExtendedPrivateChat due")
|
||||
data class ExtendedPrivateChatImpl(
|
||||
@SerialName(idField)
|
||||
override val id: UserId,
|
||||
@@ -80,6 +84,7 @@ data class ExtendedPrivateChatImpl(
|
||||
typealias ExtendedUser = ExtendedPrivateChatImpl
|
||||
|
||||
@Serializable
|
||||
@RiskFeature("This class is a subject of changes. It is better to use ExtendedSupergroupChat due")
|
||||
data class ExtendedSupergroupChatImpl(
|
||||
@SerialName(idField)
|
||||
override val id: ChatId,
|
||||
@@ -121,6 +126,7 @@ data class ExtendedSupergroupChatImpl(
|
||||
) : ExtendedSupergroupChat
|
||||
|
||||
@Serializable
|
||||
@RiskFeature("This class is a subject of changes. It is better to use ExtendedForumChat due")
|
||||
data class ExtendedForumChatImpl(
|
||||
@SerialName(idField)
|
||||
override val id: IdChatIdentifier,
|
||||
|
@@ -4,10 +4,12 @@ import dev.inmo.micro_utils.language_codes.IetfLanguageCode
|
||||
import dev.inmo.micro_utils.language_codes.IetfLanguageCodeSerializer
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.types.abstracts.WithOptionalLanguageCode
|
||||
import dev.inmo.tgbotapi.utils.RiskFeature
|
||||
import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@Serializable
|
||||
@RiskFeature("This class is a subject of changes. It is better to use GroupChat due")
|
||||
data class GroupChatImpl(
|
||||
@SerialName(idField)
|
||||
override val id: ChatId,
|
||||
@@ -16,6 +18,7 @@ data class GroupChatImpl(
|
||||
) : GroupChat
|
||||
|
||||
@Serializable
|
||||
@RiskFeature("This class is a subject of changes. It is better to use PrivateChat due")
|
||||
data class PrivateChatImpl(
|
||||
@SerialName(idField)
|
||||
override val id: UserId,
|
||||
@@ -28,6 +31,7 @@ data class PrivateChatImpl(
|
||||
) : PrivateChat
|
||||
|
||||
@Serializable
|
||||
@RiskFeature("This class is a subject of changes. It is better to use SupergroupChat due")
|
||||
data class SupergroupChatImpl(
|
||||
@SerialName(idField)
|
||||
override val id: ChatId,
|
||||
@@ -38,6 +42,7 @@ data class SupergroupChatImpl(
|
||||
) : SupergroupChat
|
||||
|
||||
@Serializable
|
||||
@RiskFeature("This class is a subject of changes. It is better to use ForumChat due")
|
||||
data class ForumChatImpl(
|
||||
@SerialName(idField)
|
||||
override val id: IdChatIdentifier,
|
||||
@@ -48,6 +53,7 @@ data class ForumChatImpl(
|
||||
) : ForumChat
|
||||
|
||||
@Serializable
|
||||
@RiskFeature("This class is a subject of changes. It is better to use ChannelChat due")
|
||||
data class ChannelChatImpl(
|
||||
@SerialName(idField)
|
||||
override val id: ChatId,
|
||||
|
@@ -2,4 +2,4 @@ package dev.inmo.tgbotapi.utils.internal
|
||||
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
internal annotation class ClassCastsIncluded
|
||||
internal annotation class ClassCastsIncluded(val typesRegex: String = ".*", val excludeRegex: String = "")
|
||||
|
Reference in New Issue
Block a user