mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-22 08:13:47 +00:00
fix
This commit is contained in:
parent
acd3298d4d
commit
5bf30bc6c6
@ -33,7 +33,7 @@ data class OwnerChatMember(
|
||||
@Transient
|
||||
override val canManageVideoChats: Boolean = true
|
||||
@Transient
|
||||
override val canManageChat: Boolean = true,
|
||||
override val canManageChat: Boolean = true
|
||||
@Transient
|
||||
override val canManageTopics: Boolean = true
|
||||
@SerialName(statusField)
|
||||
|
@ -124,6 +124,7 @@ import dev.inmo.tgbotapi.types.chat.ExtendedBot
|
||||
import dev.inmo.tgbotapi.types.chat.ExtendedChannelChat
|
||||
import dev.inmo.tgbotapi.types.chat.ExtendedChannelChatImpl
|
||||
import dev.inmo.tgbotapi.types.chat.ExtendedChat
|
||||
import dev.inmo.tgbotapi.types.chat.ExtendedChatWithUsername
|
||||
import dev.inmo.tgbotapi.types.chat.ExtendedForumChat
|
||||
import dev.inmo.tgbotapi.types.chat.ExtendedForumChatImpl
|
||||
import dev.inmo.tgbotapi.types.chat.ExtendedGroupChat
|
||||
@ -2098,6 +2099,15 @@ public inline fun Chat.extendedChatOrThrow(): ExtendedChat = this as
|
||||
public inline fun <T> Chat.ifExtendedChat(block: (ExtendedChat) -> T): T? = extendedChatOrNull()
|
||||
?.let(block)
|
||||
|
||||
public inline fun Chat.extendedChatWithUsernameOrNull(): ExtendedChatWithUsername? = this as?
|
||||
dev.inmo.tgbotapi.types.chat.ExtendedChatWithUsername
|
||||
|
||||
public inline fun Chat.extendedChatWithUsernameOrThrow(): ExtendedChatWithUsername = this as
|
||||
dev.inmo.tgbotapi.types.chat.ExtendedChatWithUsername
|
||||
|
||||
public inline fun <T> Chat.ifExtendedChatWithUsername(block: (ExtendedChatWithUsername) -> T): T? =
|
||||
extendedChatWithUsernameOrNull() ?.let(block)
|
||||
|
||||
public inline fun Chat.groupChatImplOrNull(): GroupChatImpl? = this as?
|
||||
dev.inmo.tgbotapi.types.chat.GroupChatImpl
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user