This commit is contained in:
InsanusMokrassar 2022-11-06 14:28:16 +06:00
parent acd3298d4d
commit 5bf30bc6c6
2 changed files with 11 additions and 1 deletions

View File

@ -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)

View File

@ -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