checked 2.1.0 and Bot API 6.1 + update several examples

This commit is contained in:
2022-06-21 19:45:24 +06:00
parent 4ae700b58a
commit 0217f97014
4 changed files with 43 additions and 11 deletions

View File

@@ -26,7 +26,13 @@ suspend fun main(vararg args: String) {
is UserForwardInfo -> {
val user = forwardInfo.from
when (user) {
is CommonUser -> regular("User ")
is CommonUser -> {
if (user.isPremium) {
regular("Premium user ")
} else {
regular("User ")
}
}
is CommonBot,
is ExtendedBot -> regular("Bot ")
} + code(user.id.chatId.toString()) + " (${user.firstName} ${user.lastName}: ${user.username ?.username ?: "Without username"})"