mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2026-01-12 08:19:16 +00:00
make chats to support private forums
This commit is contained in:
@@ -1425,6 +1425,8 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsNewKt {
|
||||
public static final fun extendedNonBotChatOrThrow (Ldev/inmo/tgbotapi/types/chat/Chat;)Ldev/inmo/tgbotapi/types/chat/ExtendedNonBotChat;
|
||||
public static final fun extendedPrivateChatOrNull (Ldev/inmo/tgbotapi/types/chat/Chat;)Ldev/inmo/tgbotapi/types/chat/ExtendedPrivateChat;
|
||||
public static final fun extendedPrivateChatOrThrow (Ldev/inmo/tgbotapi/types/chat/Chat;)Ldev/inmo/tgbotapi/types/chat/ExtendedPrivateChat;
|
||||
public static final fun extendedPrivateForumChatOrNull (Ldev/inmo/tgbotapi/types/chat/Chat;)Ldev/inmo/tgbotapi/types/chat/ExtendedPrivateForumChat;
|
||||
public static final fun extendedPrivateForumChatOrThrow (Ldev/inmo/tgbotapi/types/chat/Chat;)Ldev/inmo/tgbotapi/types/chat/ExtendedPrivateForumChat;
|
||||
public static final fun extendedPublicChatOrNull (Ldev/inmo/tgbotapi/types/chat/Chat;)Ldev/inmo/tgbotapi/types/chat/ExtendedPublicChat;
|
||||
public static final fun extendedPublicChatOrThrow (Ldev/inmo/tgbotapi/types/chat/Chat;)Ldev/inmo/tgbotapi/types/chat/ExtendedPublicChat;
|
||||
public static final fun extendedSupergroupChatOrNull (Ldev/inmo/tgbotapi/types/chat/Chat;)Ldev/inmo/tgbotapi/types/chat/ExtendedSupergroupChat;
|
||||
@@ -1745,6 +1747,7 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsNewKt {
|
||||
public static final fun ifExtendedGroupChat (Ldev/inmo/tgbotapi/types/chat/Chat;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||
public static final fun ifExtendedNonBotChat (Ldev/inmo/tgbotapi/types/chat/Chat;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||
public static final fun ifExtendedPrivateChat (Ldev/inmo/tgbotapi/types/chat/Chat;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||
public static final fun ifExtendedPrivateForumChat (Ldev/inmo/tgbotapi/types/chat/Chat;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||
public static final fun ifExtendedPublicChat (Ldev/inmo/tgbotapi/types/chat/Chat;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||
public static final fun ifExtendedSupergroupChat (Ldev/inmo/tgbotapi/types/chat/Chat;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||
public static final fun ifExternal (Ldev/inmo/tgbotapi/types/ReplyInfo;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||
@@ -1975,6 +1978,7 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsNewKt {
|
||||
public static final fun ifPreviewForumChat (Ldev/inmo/tgbotapi/types/chat/Chat;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||
public static final fun ifPreviewGroupChat (Ldev/inmo/tgbotapi/types/chat/Chat;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||
public static final fun ifPreviewPrivateChat (Ldev/inmo/tgbotapi/types/chat/Chat;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||
public static final fun ifPreviewPrivateForumChat (Ldev/inmo/tgbotapi/types/chat/Chat;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||
public static final fun ifPreviewPublicChat (Ldev/inmo/tgbotapi/types/chat/Chat;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||
public static final fun ifPreviewSuperPublicChat (Ldev/inmo/tgbotapi/types/chat/Chat;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||
public static final fun ifPreviewSupergroupChat (Ldev/inmo/tgbotapi/types/chat/Chat;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||
@@ -1986,6 +1990,8 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsNewKt {
|
||||
public static final fun ifPrivateContentMessage (Ldev/inmo/tgbotapi/types/message/abstracts/Message;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||
public static final fun ifPrivateEvent (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||
public static final fun ifPrivateEventMessage (Ldev/inmo/tgbotapi/types/message/abstracts/Message;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||
public static final fun ifPrivateForumChat (Ldev/inmo/tgbotapi/types/chat/Chat;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||
public static final fun ifPrivateUserChat (Ldev/inmo/tgbotapi/types/chat/Chat;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||
public static final fun ifProximityAlertTriggered (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||
public static final fun ifPublicChat (Ldev/inmo/tgbotapi/types/chat/Chat;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||
public static final fun ifPublicChatEvent (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||
@@ -2053,6 +2059,7 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsNewKt {
|
||||
public static final fun ifSupergroupEvent (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||
public static final fun ifSupergroupEventMessage (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||
public static final fun ifSupergroupEventMessage (Ldev/inmo/tgbotapi/types/message/abstracts/Message;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||
public static final fun ifSupergroupForumChat (Ldev/inmo/tgbotapi/types/chat/Chat;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||
public static final fun ifSwitchInlineQueryChosenChatInlineKeyboardButton (Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/InlineKeyboardButton;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||
public static final fun ifSwitchInlineQueryCurrentChatInlineKeyboardButton (Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/InlineKeyboardButton;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||
public static final fun ifSwitchInlineQueryInlineKeyboardButton (Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/InlineKeyboardButton;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||
@@ -2480,6 +2487,8 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsNewKt {
|
||||
public static final fun previewGroupChatOrThrow (Ldev/inmo/tgbotapi/types/chat/Chat;)Ldev/inmo/tgbotapi/types/chat/PreviewGroupChat;
|
||||
public static final fun previewPrivateChatOrNull (Ldev/inmo/tgbotapi/types/chat/Chat;)Ldev/inmo/tgbotapi/types/chat/PreviewPrivateChat;
|
||||
public static final fun previewPrivateChatOrThrow (Ldev/inmo/tgbotapi/types/chat/Chat;)Ldev/inmo/tgbotapi/types/chat/PreviewPrivateChat;
|
||||
public static final fun previewPrivateForumChatOrNull (Ldev/inmo/tgbotapi/types/chat/Chat;)Ldev/inmo/tgbotapi/types/chat/PreviewPrivateForumChat;
|
||||
public static final fun previewPrivateForumChatOrThrow (Ldev/inmo/tgbotapi/types/chat/Chat;)Ldev/inmo/tgbotapi/types/chat/PreviewPrivateForumChat;
|
||||
public static final fun previewPublicChatOrNull (Ldev/inmo/tgbotapi/types/chat/Chat;)Ldev/inmo/tgbotapi/types/chat/PreviewPublicChat;
|
||||
public static final fun previewPublicChatOrThrow (Ldev/inmo/tgbotapi/types/chat/Chat;)Ldev/inmo/tgbotapi/types/chat/PreviewPublicChat;
|
||||
public static final fun previewSuperPublicChatOrNull (Ldev/inmo/tgbotapi/types/chat/Chat;)Ldev/inmo/tgbotapi/types/chat/PreviewSuperPublicChat;
|
||||
@@ -2502,6 +2511,10 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsNewKt {
|
||||
public static final fun privateEventMessageOrThrow (Ldev/inmo/tgbotapi/types/message/abstracts/Message;)Ldev/inmo/tgbotapi/types/message/PrivateEventMessage;
|
||||
public static final fun privateEventOrNull (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/PrivateEvent;
|
||||
public static final fun privateEventOrThrow (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/PrivateEvent;
|
||||
public static final fun privateForumChatOrNull (Ldev/inmo/tgbotapi/types/chat/Chat;)Ldev/inmo/tgbotapi/types/chat/PrivateForumChat;
|
||||
public static final fun privateForumChatOrThrow (Ldev/inmo/tgbotapi/types/chat/Chat;)Ldev/inmo/tgbotapi/types/chat/PrivateForumChat;
|
||||
public static final fun privateUserChatOrNull (Ldev/inmo/tgbotapi/types/chat/Chat;)Ldev/inmo/tgbotapi/types/chat/PrivateUserChat;
|
||||
public static final fun privateUserChatOrThrow (Ldev/inmo/tgbotapi/types/chat/Chat;)Ldev/inmo/tgbotapi/types/chat/PrivateUserChat;
|
||||
public static final fun proximityAlertTriggeredOrNull (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/message/ChatEvents/ProximityAlertTriggered;
|
||||
public static final fun proximityAlertTriggeredOrThrow (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/message/ChatEvents/ProximityAlertTriggered;
|
||||
public static final fun publicChatEventOrNull (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/PublicChatEvent;
|
||||
@@ -2636,6 +2649,8 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsNewKt {
|
||||
public static final fun supergroupEventMessageOrThrow (Ldev/inmo/tgbotapi/types/message/abstracts/Message;)Ldev/inmo/tgbotapi/types/message/abstracts/SupergroupEventMessage;
|
||||
public static final fun supergroupEventOrNull (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/SupergroupEvent;
|
||||
public static final fun supergroupEventOrThrow (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/SupergroupEvent;
|
||||
public static final fun supergroupForumChatOrNull (Ldev/inmo/tgbotapi/types/chat/Chat;)Ldev/inmo/tgbotapi/types/chat/SupergroupForumChat;
|
||||
public static final fun supergroupForumChatOrThrow (Ldev/inmo/tgbotapi/types/chat/Chat;)Ldev/inmo/tgbotapi/types/chat/SupergroupForumChat;
|
||||
public static final fun switchInlineQueryChosenChatInlineKeyboardButtonOrNull (Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/InlineKeyboardButton;)Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/SwitchInlineQueryChosenChatInlineKeyboardButton;
|
||||
public static final fun switchInlineQueryChosenChatInlineKeyboardButtonOrThrow (Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/InlineKeyboardButton;)Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/SwitchInlineQueryChosenChatInlineKeyboardButton;
|
||||
public static final fun switchInlineQueryCurrentChatInlineKeyboardButtonOrNull (Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/InlineKeyboardButton;)Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/SwitchInlineQueryCurrentChatInlineKeyboardButton;
|
||||
|
||||
@@ -142,6 +142,7 @@ import dev.inmo.tgbotapi.types.chat.ExtendedForumChat
|
||||
import dev.inmo.tgbotapi.types.chat.ExtendedGroupChat
|
||||
import dev.inmo.tgbotapi.types.chat.ExtendedNonBotChat
|
||||
import dev.inmo.tgbotapi.types.chat.ExtendedPrivateChat
|
||||
import dev.inmo.tgbotapi.types.chat.ExtendedPrivateForumChat
|
||||
import dev.inmo.tgbotapi.types.chat.ExtendedPublicChat
|
||||
import dev.inmo.tgbotapi.types.chat.ExtendedSupergroupChat
|
||||
import dev.inmo.tgbotapi.types.chat.ForumChat
|
||||
@@ -155,15 +156,19 @@ import dev.inmo.tgbotapi.types.chat.PreviewChat
|
||||
import dev.inmo.tgbotapi.types.chat.PreviewForumChat
|
||||
import dev.inmo.tgbotapi.types.chat.PreviewGroupChat
|
||||
import dev.inmo.tgbotapi.types.chat.PreviewPrivateChat
|
||||
import dev.inmo.tgbotapi.types.chat.PreviewPrivateForumChat
|
||||
import dev.inmo.tgbotapi.types.chat.PreviewPublicChat
|
||||
import dev.inmo.tgbotapi.types.chat.PreviewSuperPublicChat
|
||||
import dev.inmo.tgbotapi.types.chat.PreviewSupergroupChat
|
||||
import dev.inmo.tgbotapi.types.chat.PreviewUser
|
||||
import dev.inmo.tgbotapi.types.chat.PreviewUsernameChat
|
||||
import dev.inmo.tgbotapi.types.chat.PrivateChat
|
||||
import dev.inmo.tgbotapi.types.chat.PrivateForumChat
|
||||
import dev.inmo.tgbotapi.types.chat.PrivateUserChat
|
||||
import dev.inmo.tgbotapi.types.chat.PublicChat
|
||||
import dev.inmo.tgbotapi.types.chat.SuperPublicChat
|
||||
import dev.inmo.tgbotapi.types.chat.SupergroupChat
|
||||
import dev.inmo.tgbotapi.types.chat.SupergroupForumChat
|
||||
import dev.inmo.tgbotapi.types.chat.UnknownChatType
|
||||
import dev.inmo.tgbotapi.types.chat.UnknownExtendedChat
|
||||
import dev.inmo.tgbotapi.types.chat.User
|
||||
@@ -1330,6 +1335,12 @@ public inline fun Chat.extendedPrivateChatOrThrow(): ExtendedPrivateChat = this
|
||||
|
||||
public inline fun <T> Chat.ifExtendedPrivateChat(block: (ExtendedPrivateChat) -> T): T? = extendedPrivateChatOrNull() ?.let(block)
|
||||
|
||||
public inline fun Chat.extendedPrivateForumChatOrNull(): ExtendedPrivateForumChat? = this as? dev.inmo.tgbotapi.types.chat.ExtendedPrivateForumChat
|
||||
|
||||
public inline fun Chat.extendedPrivateForumChatOrThrow(): ExtendedPrivateForumChat = this as dev.inmo.tgbotapi.types.chat.ExtendedPrivateForumChat
|
||||
|
||||
public inline fun <T> Chat.ifExtendedPrivateForumChat(block: (ExtendedPrivateForumChat) -> T): T? = extendedPrivateForumChatOrNull() ?.let(block)
|
||||
|
||||
public inline fun Chat.extendedPublicChatOrNull(): ExtendedPublicChat? = this as? dev.inmo.tgbotapi.types.chat.ExtendedPublicChat
|
||||
|
||||
public inline fun Chat.extendedPublicChatOrThrow(): ExtendedPublicChat = this as dev.inmo.tgbotapi.types.chat.ExtendedPublicChat
|
||||
@@ -1420,6 +1431,18 @@ public inline fun Chat.privateChatOrThrow(): PrivateChat = this as dev.inmo.tgbo
|
||||
|
||||
public inline fun <T> Chat.ifPrivateChat(block: (PrivateChat) -> T): T? = privateChatOrNull() ?.let(block)
|
||||
|
||||
public inline fun Chat.privateUserChatOrNull(): PrivateUserChat? = this as? dev.inmo.tgbotapi.types.chat.PrivateUserChat
|
||||
|
||||
public inline fun Chat.privateUserChatOrThrow(): PrivateUserChat = this as dev.inmo.tgbotapi.types.chat.PrivateUserChat
|
||||
|
||||
public inline fun <T> Chat.ifPrivateUserChat(block: (PrivateUserChat) -> T): T? = privateUserChatOrNull() ?.let(block)
|
||||
|
||||
public inline fun Chat.privateForumChatOrNull(): PrivateForumChat? = this as? dev.inmo.tgbotapi.types.chat.PrivateForumChat
|
||||
|
||||
public inline fun Chat.privateForumChatOrThrow(): PrivateForumChat = this as dev.inmo.tgbotapi.types.chat.PrivateForumChat
|
||||
|
||||
public inline fun <T> Chat.ifPrivateForumChat(block: (PrivateForumChat) -> T): T? = privateForumChatOrNull() ?.let(block)
|
||||
|
||||
public inline fun Chat.businessChatOrNull(): BusinessChat? = this as? dev.inmo.tgbotapi.types.chat.BusinessChat
|
||||
|
||||
public inline fun Chat.businessChatOrThrow(): BusinessChat = this as dev.inmo.tgbotapi.types.chat.BusinessChat
|
||||
@@ -1462,6 +1485,12 @@ public inline fun Chat.forumChatOrThrow(): ForumChat = this as dev.inmo.tgbotapi
|
||||
|
||||
public inline fun <T> Chat.ifForumChat(block: (ForumChat) -> T): T? = forumChatOrNull() ?.let(block)
|
||||
|
||||
public inline fun Chat.supergroupForumChatOrNull(): SupergroupForumChat? = this as? dev.inmo.tgbotapi.types.chat.SupergroupForumChat
|
||||
|
||||
public inline fun Chat.supergroupForumChatOrThrow(): SupergroupForumChat = this as dev.inmo.tgbotapi.types.chat.SupergroupForumChat
|
||||
|
||||
public inline fun <T> Chat.ifSupergroupForumChat(block: (SupergroupForumChat) -> T): T? = supergroupForumChatOrNull() ?.let(block)
|
||||
|
||||
public inline fun Chat.channelDirectMessagesChatOrNull(): ChannelDirectMessagesChat? = this as? dev.inmo.tgbotapi.types.chat.ChannelDirectMessagesChat
|
||||
|
||||
public inline fun Chat.channelDirectMessagesChatOrThrow(): ChannelDirectMessagesChat = this as dev.inmo.tgbotapi.types.chat.ChannelDirectMessagesChat
|
||||
@@ -1510,6 +1539,12 @@ public inline fun Chat.previewPrivateChatOrThrow(): PreviewPrivateChat = this as
|
||||
|
||||
public inline fun <T> Chat.ifPreviewPrivateChat(block: (PreviewPrivateChat) -> T): T? = previewPrivateChatOrNull() ?.let(block)
|
||||
|
||||
public inline fun Chat.previewPrivateForumChatOrNull(): PreviewPrivateForumChat? = this as? dev.inmo.tgbotapi.types.chat.PreviewPrivateForumChat
|
||||
|
||||
public inline fun Chat.previewPrivateForumChatOrThrow(): PreviewPrivateForumChat = this as dev.inmo.tgbotapi.types.chat.PreviewPrivateForumChat
|
||||
|
||||
public inline fun <T> Chat.ifPreviewPrivateForumChat(block: (PreviewPrivateForumChat) -> T): T? = previewPrivateForumChatOrNull() ?.let(block)
|
||||
|
||||
public inline fun Chat.previewBusinessChatOrNull(): PreviewBusinessChat? = this as? dev.inmo.tgbotapi.types.chat.PreviewBusinessChat
|
||||
|
||||
public inline fun Chat.previewBusinessChatOrThrow(): PreviewBusinessChat = this as dev.inmo.tgbotapi.types.chat.PreviewBusinessChat
|
||||
|
||||
Reference in New Issue
Block a user