mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-26 03:58:44 +00:00
update KDocs
This commit is contained in:
parent
944fe6d820
commit
e4f35c0eba
@ -42,6 +42,9 @@ private fun ChatInviteLink.toRawChatInviteLink() = RawChatInviteLink(
|
|||||||
(this as? ChatInviteLinkWithJoinRequest) ?.leftToReview
|
(this as? ChatInviteLinkWithJoinRequest) ?.leftToReview
|
||||||
)
|
)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Base interface for all chat invite links. See inheritors for more info or official [docs](https://core.telegram.org/bots/api#chatinvitelink)
|
||||||
|
*/
|
||||||
@Serializable(ChatInviteLinkSerializer::class)
|
@Serializable(ChatInviteLinkSerializer::class)
|
||||||
sealed interface ChatInviteLink : WithUser {
|
sealed interface ChatInviteLink : WithUser {
|
||||||
val inviteLink: String
|
val inviteLink: String
|
||||||
@ -60,6 +63,9 @@ sealed interface ChatInviteLink : WithUser {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Base interface for all [ChatInviteLink]s which are NOT [PrimaryInviteLink]
|
||||||
|
*/
|
||||||
@Serializable(ChatInviteLinkSerializer::class)
|
@Serializable(ChatInviteLinkSerializer::class)
|
||||||
sealed interface SecondaryChatInviteLink : ChatInviteLink {
|
sealed interface SecondaryChatInviteLink : ChatInviteLink {
|
||||||
override val isPrimary: Boolean
|
override val isPrimary: Boolean
|
||||||
@ -70,6 +76,9 @@ sealed interface SecondaryChatInviteLink : ChatInviteLink {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Primary invite link in the chat for this bot
|
||||||
|
*/
|
||||||
@Serializable
|
@Serializable
|
||||||
data class PrimaryInviteLink(
|
data class PrimaryInviteLink(
|
||||||
@SerialName(inviteLinkField)
|
@SerialName(inviteLinkField)
|
||||||
@ -87,6 +96,12 @@ data class PrimaryInviteLink(
|
|||||||
get() = null
|
get() = null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Represent [SecondaryChatInviteLink] which will require an aprovement from one of the administrators
|
||||||
|
*
|
||||||
|
* @see ChatJoinRequest
|
||||||
|
* @see dev.inmo.tgbotapi.types.update.ChatJoinRequestUpdate
|
||||||
|
*/
|
||||||
@Serializable
|
@Serializable
|
||||||
data class ChatInviteLinkWithJoinRequest(
|
data class ChatInviteLinkWithJoinRequest(
|
||||||
@SerialName(inviteLinkField)
|
@SerialName(inviteLinkField)
|
||||||
@ -106,6 +121,9 @@ data class ChatInviteLinkWithJoinRequest(
|
|||||||
get() = expireDate ?.asDate
|
get() = expireDate ?.asDate
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Represent [SecondaryChatInviteLink] which will have limitation for the amount of chat members to join
|
||||||
|
*/
|
||||||
@Serializable
|
@Serializable
|
||||||
data class ChatInviteLinkWithLimitedMembers(
|
data class ChatInviteLinkWithLimitedMembers(
|
||||||
@SerialName(inviteLinkField)
|
@SerialName(inviteLinkField)
|
||||||
@ -125,6 +143,10 @@ data class ChatInviteLinkWithLimitedMembers(
|
|||||||
get() = expireDate ?.asDate
|
get() = expireDate ?.asDate
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Represent [SecondaryChatInviteLink] which have no any restrictions like [ChatInviteLinkWithJoinRequest] or
|
||||||
|
* [ChatInviteLinkWithLimitedMembers]
|
||||||
|
*/
|
||||||
@Serializable
|
@Serializable
|
||||||
data class ChatInviteLinkUnlimited(
|
data class ChatInviteLinkUnlimited(
|
||||||
@SerialName(inviteLinkField)
|
@SerialName(inviteLinkField)
|
||||||
|
@ -5,6 +5,9 @@ import dev.inmo.tgbotapi.types.chat.abstracts.PublicChat
|
|||||||
import kotlinx.serialization.SerialName
|
import kotlinx.serialization.SerialName
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Represent a [ChatJoinRequest](https://core.telegram.org/bots/api#chatjoinrequest)
|
||||||
|
*/
|
||||||
@Serializable
|
@Serializable
|
||||||
data class ChatJoinRequest(
|
data class ChatJoinRequest(
|
||||||
@SerialName(chatField)
|
@SerialName(chatField)
|
||||||
|
Loading…
Reference in New Issue
Block a user