1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-22 08:13:47 +00:00
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 @Transient
override val canManageVideoChats: Boolean = true override val canManageVideoChats: Boolean = true
@Transient @Transient
override val canManageChat: Boolean = true, override val canManageChat: Boolean = true
@Transient @Transient
override val canManageTopics: Boolean = true override val canManageTopics: Boolean = true
@SerialName(statusField) @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.ExtendedChannelChat
import dev.inmo.tgbotapi.types.chat.ExtendedChannelChatImpl import dev.inmo.tgbotapi.types.chat.ExtendedChannelChatImpl
import dev.inmo.tgbotapi.types.chat.ExtendedChat 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.ExtendedForumChat
import dev.inmo.tgbotapi.types.chat.ExtendedForumChatImpl import dev.inmo.tgbotapi.types.chat.ExtendedForumChatImpl
import dev.inmo.tgbotapi.types.chat.ExtendedGroupChat 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() public inline fun <T> Chat.ifExtendedChat(block: (ExtendedChat) -> T): T? = extendedChatOrNull()
?.let(block) ?.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? public inline fun Chat.groupChatImplOrNull(): GroupChatImpl? = this as?
dev.inmo.tgbotapi.types.chat.GroupChatImpl dev.inmo.tgbotapi.types.chat.GroupChatImpl