mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-25 11:38:45 +00:00
toChatId extensions adding
This commit is contained in:
parent
4e276846b4
commit
bdd1b9638a
@ -7,6 +7,7 @@
|
|||||||
* `SwitchInlineQueryCurrentChatInlineKeyboardButton#switchInlineQueryCurrentChat` field fixed
|
* `SwitchInlineQueryCurrentChatInlineKeyboardButton#switchInlineQueryCurrentChat` field fixed
|
||||||
* `InlineKeyboardButton` now is sealed class and all its possible realisations are inside of its class file
|
* `InlineKeyboardButton` now is sealed class and all its possible realisations are inside of its class file
|
||||||
* `String#asUsername` method renamed to `String#toUsername`
|
* `String#asUsername` method renamed to `String#toUsername`
|
||||||
|
* Several `toChatId` extensions added
|
||||||
|
|
||||||
## 0.15.0
|
## 0.15.0
|
||||||
|
|
||||||
|
@ -20,6 +20,8 @@ val ChatId.link: String
|
|||||||
typealias UserId = ChatId
|
typealias UserId = ChatId
|
||||||
|
|
||||||
fun Identifier.toChatId(): ChatId = ChatId(this)
|
fun Identifier.toChatId(): ChatId = ChatId(this)
|
||||||
|
fun Int.toChatId(): ChatId = toLong().toChatId()
|
||||||
|
fun Byte.toChatId(): ChatId = toLong().toChatId()
|
||||||
|
|
||||||
@Serializable(ChatIdentifierSerializer::class)
|
@Serializable(ChatIdentifierSerializer::class)
|
||||||
data class Username(
|
data class Username(
|
||||||
|
Loading…
Reference in New Issue
Block a user