ChatId

A Chat id that can be either Long or String. If it's a string, it should start with '@'.

ChatId is usually used for request body types and is not recommended for scenarios that require deserialization. It is serialized directly to a literal value, such as a number or a string, rather than a struct.

In Java, create an instance of ChatId via ChatIds.valueOf(...) .

Constructors

Link copied to clipboard
protected constructor()

Properties

Link copied to clipboard
abstract val long: Long

Chat id of type Long. This parameter is valid only if string is not null, otherwise, return 0 always.

Link copied to clipboard
abstract val string: String?

Chat id of type String. This parameter is valid only if string is not null.

Functions

Link copied to clipboard
operator override fun equals(other: Any?): Boolean
Link copied to clipboard
override fun hashCode(): Int