ChatIdentifier

@Serializable(with = ChatIdentifierSerializer::class)
sealed interface ChatIdentifier(source)

Identifies a Telegram chat either by numeric IdChatIdentifier or by Username.

Inheritors

Properties

Link copied to clipboard

Returns the embedded business connection, or null when no business connection is available.

Link copied to clipboard

Returns the embedded channel direct-message thread, or null when no direct-message thread is available.

Link copied to clipboard

Returns the embedded ephemeral-message identifier, or null when no identifier is available.

Link copied to clipboard

Returns the embedded ephemeral-message receiver, or null when no receiver is available.

Link copied to clipboard

Returns the embedded message thread, or null when no message thread is available.

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> ChatIdentifier.ifBusinessChatId(block: (BusinessChatId) -> T): T?
Link copied to clipboard
inline fun <T> ChatIdentifier.ifChatId(block: (ChatId) -> T): T?
Link copied to clipboard
Link copied to clipboard
inline fun <T> ChatIdentifier.ifEphemeralChatId(block: (EphemeralChatId) -> T): T?
Link copied to clipboard
Link copied to clipboard
inline fun <T> ChatIdentifier.ifUsername(block: (Username) -> T): T?
Link copied to clipboard
Link copied to clipboard