1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2025-10-24 00:30:09 +00:00

improve messages hierarchy

This commit is contained in:
2025-09-22 12:19:34 +06:00
parent 2695b03968
commit 2ff11ad73c
11 changed files with 445 additions and 83 deletions

View File

@@ -698,8 +698,6 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/W
public static synthetic fun waitSuggestedPostApproved$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
public static final fun waitSuggestedPostDeclined (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
public static synthetic fun waitSuggestedPostDeclined$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
public static final fun waitSuggestedPostInfo (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
public static synthetic fun waitSuggestedPostInfo$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
public static final fun waitSuggestedPostPaid (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
public static synthetic fun waitSuggestedPostPaid$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
public static final fun waitSuggestedPostRefunded (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
@@ -1426,8 +1424,6 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handl
public static synthetic fun onSuggestedPostApproved$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
public static final fun onSuggestedPostDeclined (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
public static synthetic fun onSuggestedPostDeclined$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
public static final fun onSuggestedPostInfo (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
public static synthetic fun onSuggestedPostInfo$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
public static final fun onSuggestedPostPaid (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
public static synthetic fun onSuggestedPostPaid$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
public static final fun onSuggestedPostRefunded (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;

View File

@@ -313,8 +313,3 @@ fun BehaviourContext.waitSuggestedPostApproved(
initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null }
) = waitEvents<SuggestedPostApproved>(initRequest, errorFactory)
fun BehaviourContext.waitSuggestedPostInfo(
initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null }
) = waitEvents<SuggestedPostInfo>(initRequest, errorFactory)

View File

@@ -1191,28 +1191,6 @@ fun <BC : BehaviourContext> BC.onChannelDirectMessagesConfigurationChanged(
) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
/**
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
* @param subcontextUpdatesFilter This filter will be applied to each update inside of [scenarioReceiver]. For example,
* this filter will be used if you will call [dev.inmo.tgbotapi.extensions.behaviour_builder.expectations.waitContentMessage].
* Use [dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContextAndTwoTypesReceiver] function to create your own.
* Use [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.plus] or [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.times]
* to combinate several filters
* @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream".
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
* "stream"
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
* data
*/
fun <BC : BehaviourContext> BC.onSuggestedPostInfo(
initialFilter: SimpleFilter<ChannelDirectMessagesEventMessage<SuggestedPostInfo>>? = null,
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChannelDirectMessagesEventMessage<SuggestedPostInfo>, Update>? = MessageFilterByChat,
markerFactory: MarkerFactory<in ChannelDirectMessagesEventMessage<SuggestedPostInfo>, Any>? = ByChatMessageMarkerFactory,
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChannelDirectMessagesEventMessage<SuggestedPostInfo>>? = null,
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChannelDirectMessagesEventMessage<SuggestedPostInfo>>
) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
/**
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
* @param subcontextUpdatesFilter This filter will be applied to each update inside of [scenarioReceiver]. For example,

View File

@@ -22810,7 +22810,7 @@ public final class dev/inmo/tgbotapi/types/message/ChatEvents/suggested/Suggeste
public final fun serializer ()Lkotlinx/serialization/KSerializer;
}
public final class dev/inmo/tgbotapi/types/message/ChatEvents/suggested/SuggestedPostInfo : dev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChannelDirectMessagesEvent {
public final class dev/inmo/tgbotapi/types/message/ChatEvents/suggested/SuggestedPostInfo {
public static final field Companion Ldev/inmo/tgbotapi/types/message/ChatEvents/suggested/SuggestedPostInfo$Companion;
public fun <init> (Ldev/inmo/tgbotapi/types/message/ChatEvents/suggested/SuggestedPostInfo$State;Ldev/inmo/tgbotapi/types/payments/SuggestedPostPrice;Ljava/lang/Integer;)V
public synthetic fun <init> (Ldev/inmo/tgbotapi/types/message/ChatEvents/suggested/SuggestedPostInfo$State;Ldev/inmo/tgbotapi/types/payments/SuggestedPostPrice;Ljava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
@@ -23354,6 +23354,62 @@ public final class dev/inmo/tgbotapi/types/message/CommonGroupEventMessage : dev
public fun toString ()Ljava/lang/String;
}
public final class dev/inmo/tgbotapi/types/message/CommonSuggestedChannelDirectMessagesContentMessageImpl : dev/inmo/tgbotapi/types/message/abstracts/CommonSuggestedChannelDirectMessagesContentMessage {
public synthetic fun <init> (Ldev/inmo/tgbotapi/types/chat/PreviewChannelDirectMessagesChat;JLdev/inmo/tgbotapi/types/chat/User;DLdev/inmo/tgbotapi/types/chat/DirectMessagesTopic;Ldev/inmo/tgbotapi/types/message/ForwardInfo;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/Integer;ZLdev/inmo/tgbotapi/types/message/ChatEvents/suggested/SuggestedPostInfo;Ljava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public synthetic fun <init> (Ldev/inmo/tgbotapi/types/chat/PreviewChannelDirectMessagesChat;JLdev/inmo/tgbotapi/types/chat/User;DLdev/inmo/tgbotapi/types/chat/DirectMessagesTopic;Ldev/inmo/tgbotapi/types/message/ForwardInfo;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/Integer;ZLdev/inmo/tgbotapi/types/message/ChatEvents/suggested/SuggestedPostInfo;Ljava/lang/Integer;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public synthetic fun <init> (Ldev/inmo/tgbotapi/types/chat/PreviewChannelDirectMessagesChat;JLdev/inmo/tgbotapi/types/chat/User;DLdev/inmo/tgbotapi/types/chat/DirectMessagesTopic;Ldev/inmo/tgbotapi/types/message/MessageOrigin;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/Integer;ZLdev/inmo/tgbotapi/types/message/ChatEvents/suggested/SuggestedPostInfo;Ljava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public synthetic fun <init> (Ldev/inmo/tgbotapi/types/chat/PreviewChannelDirectMessagesChat;JLdev/inmo/tgbotapi/types/chat/User;DLdev/inmo/tgbotapi/types/chat/DirectMessagesTopic;Ldev/inmo/tgbotapi/types/message/MessageOrigin;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/Integer;ZLdev/inmo/tgbotapi/types/message/ChatEvents/suggested/SuggestedPostInfo;Ljava/lang/Integer;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()Ldev/inmo/tgbotapi/types/chat/PreviewChannelDirectMessagesChat;
public final fun component10 ()Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;
public final fun component11 ()Ldev/inmo/tgbotapi/types/message/content/MessageContent;
public final fun component12 ()Ldev/inmo/tgbotapi/types/chat/CommonBot;
public final fun component13-CsYhHCU ()Ljava/lang/String;
public final fun component14 ()Ljava/lang/Integer;
public final fun component15 ()Z
public final fun component16 ()Ldev/inmo/tgbotapi/types/message/ChatEvents/suggested/SuggestedPostInfo;
public final fun component17 ()Ljava/lang/Integer;
public final fun component2-APLFQys ()J
public final fun component3 ()Ldev/inmo/tgbotapi/types/chat/User;
public final fun component4-Wg0KzQs ()D
public final fun component5 ()Ldev/inmo/tgbotapi/types/chat/DirectMessagesTopic;
public final fun component6 ()Ldev/inmo/tgbotapi/types/message/MessageOrigin;
public final fun component7-Ivn3T5g ()Lkorlibs/time/DateTime;
public final fun component8 ()Z
public final fun component9 ()Ldev/inmo/tgbotapi/types/ReplyInfo;
public final fun copy-Yt8lx4I (Ldev/inmo/tgbotapi/types/chat/PreviewChannelDirectMessagesChat;JLdev/inmo/tgbotapi/types/chat/User;DLdev/inmo/tgbotapi/types/chat/DirectMessagesTopic;Ldev/inmo/tgbotapi/types/message/MessageOrigin;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/Integer;ZLdev/inmo/tgbotapi/types/message/ChatEvents/suggested/SuggestedPostInfo;Ljava/lang/Integer;)Ldev/inmo/tgbotapi/types/message/CommonSuggestedChannelDirectMessagesContentMessageImpl;
public static synthetic fun copy-Yt8lx4I$default (Ldev/inmo/tgbotapi/types/message/CommonSuggestedChannelDirectMessagesContentMessageImpl;Ldev/inmo/tgbotapi/types/chat/PreviewChannelDirectMessagesChat;JLdev/inmo/tgbotapi/types/chat/User;DLdev/inmo/tgbotapi/types/chat/DirectMessagesTopic;Ldev/inmo/tgbotapi/types/message/MessageOrigin;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/Integer;ZLdev/inmo/tgbotapi/types/message/ChatEvents/suggested/SuggestedPostInfo;Ljava/lang/Integer;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/message/CommonSuggestedChannelDirectMessagesContentMessageImpl;
public fun equals (Ljava/lang/Object;)Z
public fun getBusinessConnectionId-nXr5wdE ()Ljava/lang/String;
public fun getChat ()Ldev/inmo/tgbotapi/types/chat/PreviewChannelDirectMessagesChat;
public synthetic fun getChat ()Ldev/inmo/tgbotapi/types/chat/PreviewChat;
public synthetic fun getChat ()Ldev/inmo/tgbotapi/types/chat/PreviewGroupChat;
public synthetic fun getChat ()Ldev/inmo/tgbotapi/types/chat/PreviewPublicChat;
public fun getContent ()Ldev/inmo/tgbotapi/types/message/content/MessageContent;
public fun getCost ()Ljava/lang/Integer;
public fun getDate-Wg0KzQs ()D
public fun getDirectMessageThreadId-_JBF_Q4 ()J
public fun getDirectMessageTopic ()Ldev/inmo/tgbotapi/types/chat/DirectMessagesTopic;
public fun getEditDate-Ivn3T5g ()Lkorlibs/time/DateTime;
public fun getForwardInfo ()Ldev/inmo/tgbotapi/types/message/ForwardInfo;
public fun getForwardOrigin ()Ldev/inmo/tgbotapi/types/message/MessageOrigin;
public fun getForwardable ()Z
public fun getFrom ()Ldev/inmo/tgbotapi/types/chat/User;
public fun getFromOffline ()Z
public fun getHasProtectedContent ()Z
public fun getMediaGroupId-CsYhHCU ()Ljava/lang/String;
public fun getMessageId-APLFQys ()J
public fun getMetaInfo-fV8YnZ8 ()Lkotlin/Triple;
public fun getReplyInfo ()Ldev/inmo/tgbotapi/types/ReplyInfo;
public fun getReplyMarkup ()Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;
public fun getReplyTo ()Ldev/inmo/tgbotapi/types/message/abstracts/Message;
public fun getSenderBoostsCount ()Ljava/lang/Integer;
public fun getSenderBot ()Ldev/inmo/tgbotapi/types/chat/CommonBot;
public fun getSuggestedPostInfo ()Ldev/inmo/tgbotapi/types/message/ChatEvents/suggested/SuggestedPostInfo;
public fun getUser ()Ldev/inmo/tgbotapi/types/chat/User;
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
}
public final class dev/inmo/tgbotapi/types/message/CommonSupergroupEventMessage : dev/inmo/tgbotapi/types/message/abstracts/SupergroupEventMessage {
public synthetic fun <init> (JLdev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/types/chat/PreviewSupergroupChat;Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/SupergroupEvent;DLkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1-APLFQys ()J
@@ -23631,6 +23687,63 @@ public final class dev/inmo/tgbotapi/types/message/FromChannelForumContentMessag
public fun toString ()Ljava/lang/String;
}
public final class dev/inmo/tgbotapi/types/message/FromChannelSuggestedChannelDirectMessagesContentMessageImpl : dev/inmo/tgbotapi/types/message/abstracts/FromChannelSuggestedChannelDirectMessagesContentMessage {
public synthetic fun <init> (Ldev/inmo/tgbotapi/types/chat/PreviewChannelDirectMessagesChat;Ldev/inmo/tgbotapi/types/chat/PreviewChannelChat;JDLdev/inmo/tgbotapi/types/chat/DirectMessagesTopic;Ldev/inmo/tgbotapi/types/message/ForwardInfo;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/String;ZLdev/inmo/tgbotapi/types/message/ChatEvents/suggested/SuggestedPostInfo;Ljava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public synthetic fun <init> (Ldev/inmo/tgbotapi/types/chat/PreviewChannelDirectMessagesChat;Ldev/inmo/tgbotapi/types/chat/PreviewChannelChat;JDLdev/inmo/tgbotapi/types/chat/DirectMessagesTopic;Ldev/inmo/tgbotapi/types/message/ForwardInfo;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/String;ZLdev/inmo/tgbotapi/types/message/ChatEvents/suggested/SuggestedPostInfo;Ljava/lang/Integer;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public synthetic fun <init> (Ldev/inmo/tgbotapi/types/chat/PreviewChannelDirectMessagesChat;Ldev/inmo/tgbotapi/types/chat/PreviewChannelChat;JDLdev/inmo/tgbotapi/types/chat/DirectMessagesTopic;Ldev/inmo/tgbotapi/types/message/MessageOrigin;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/String;ZLdev/inmo/tgbotapi/types/message/ChatEvents/suggested/SuggestedPostInfo;Ljava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public synthetic fun <init> (Ldev/inmo/tgbotapi/types/chat/PreviewChannelDirectMessagesChat;Ldev/inmo/tgbotapi/types/chat/PreviewChannelChat;JDLdev/inmo/tgbotapi/types/chat/DirectMessagesTopic;Ldev/inmo/tgbotapi/types/message/MessageOrigin;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/String;ZLdev/inmo/tgbotapi/types/message/ChatEvents/suggested/SuggestedPostInfo;Ljava/lang/Integer;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()Ldev/inmo/tgbotapi/types/chat/PreviewChannelDirectMessagesChat;
public final fun component10 ()Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;
public final fun component11 ()Ldev/inmo/tgbotapi/types/message/content/MessageContent;
public final fun component12 ()Ldev/inmo/tgbotapi/types/chat/CommonBot;
public final fun component13 ()Ljava/lang/String;
public final fun component14-CsYhHCU ()Ljava/lang/String;
public final fun component15 ()Z
public final fun component16 ()Ldev/inmo/tgbotapi/types/message/ChatEvents/suggested/SuggestedPostInfo;
public final fun component17 ()Ljava/lang/Integer;
public final fun component2 ()Ldev/inmo/tgbotapi/types/chat/PreviewChannelChat;
public final fun component3-APLFQys ()J
public final fun component4-Wg0KzQs ()D
public final fun component5 ()Ldev/inmo/tgbotapi/types/chat/DirectMessagesTopic;
public final fun component6 ()Ldev/inmo/tgbotapi/types/message/MessageOrigin;
public final fun component7-Ivn3T5g ()Lkorlibs/time/DateTime;
public final fun component8 ()Z
public final fun component9 ()Ldev/inmo/tgbotapi/types/ReplyInfo;
public final fun copy-KbSKbt8 (Ldev/inmo/tgbotapi/types/chat/PreviewChannelDirectMessagesChat;Ldev/inmo/tgbotapi/types/chat/PreviewChannelChat;JDLdev/inmo/tgbotapi/types/chat/DirectMessagesTopic;Ldev/inmo/tgbotapi/types/message/MessageOrigin;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/String;ZLdev/inmo/tgbotapi/types/message/ChatEvents/suggested/SuggestedPostInfo;Ljava/lang/Integer;)Ldev/inmo/tgbotapi/types/message/FromChannelSuggestedChannelDirectMessagesContentMessageImpl;
public static synthetic fun copy-KbSKbt8$default (Ldev/inmo/tgbotapi/types/message/FromChannelSuggestedChannelDirectMessagesContentMessageImpl;Ldev/inmo/tgbotapi/types/chat/PreviewChannelDirectMessagesChat;Ldev/inmo/tgbotapi/types/chat/PreviewChannelChat;JDLdev/inmo/tgbotapi/types/chat/DirectMessagesTopic;Ldev/inmo/tgbotapi/types/message/MessageOrigin;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/String;ZLdev/inmo/tgbotapi/types/message/ChatEvents/suggested/SuggestedPostInfo;Ljava/lang/Integer;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/message/FromChannelSuggestedChannelDirectMessagesContentMessageImpl;
public fun equals (Ljava/lang/Object;)Z
public fun getAuthorSignature ()Ljava/lang/String;
public fun getBusinessConnectionId-nXr5wdE ()Ljava/lang/String;
public fun getChannel ()Ldev/inmo/tgbotapi/types/chat/PreviewChannelChat;
public fun getChat ()Ldev/inmo/tgbotapi/types/chat/PreviewChannelDirectMessagesChat;
public synthetic fun getChat ()Ldev/inmo/tgbotapi/types/chat/PreviewChat;
public synthetic fun getChat ()Ldev/inmo/tgbotapi/types/chat/PreviewGroupChat;
public synthetic fun getChat ()Ldev/inmo/tgbotapi/types/chat/PreviewPublicChat;
public fun getContent ()Ldev/inmo/tgbotapi/types/message/content/MessageContent;
public fun getCost ()Ljava/lang/Integer;
public fun getDate-Wg0KzQs ()D
public fun getDirectMessageThreadId-_JBF_Q4 ()J
public fun getDirectMessageTopic ()Ldev/inmo/tgbotapi/types/chat/DirectMessagesTopic;
public fun getEditDate-Ivn3T5g ()Lkorlibs/time/DateTime;
public fun getForwardInfo ()Ldev/inmo/tgbotapi/types/message/ForwardInfo;
public fun getForwardOrigin ()Ldev/inmo/tgbotapi/types/message/MessageOrigin;
public fun getForwardable ()Z
public fun getFromOffline ()Z
public fun getHasProtectedContent ()Z
public fun getMediaGroupId-CsYhHCU ()Ljava/lang/String;
public fun getMessageId-APLFQys ()J
public fun getMetaInfo-fV8YnZ8 ()Lkotlin/Triple;
public fun getReplyInfo ()Ldev/inmo/tgbotapi/types/ReplyInfo;
public fun getReplyMarkup ()Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;
public fun getReplyTo ()Ldev/inmo/tgbotapi/types/message/abstracts/Message;
public fun getSenderBot ()Ldev/inmo/tgbotapi/types/chat/CommonBot;
public fun getSenderChat ()Ldev/inmo/tgbotapi/types/chat/PreviewChannelChat;
public synthetic fun getSenderChat ()Ldev/inmo/tgbotapi/types/chat/PreviewChat;
public fun getSuggestedPostInfo ()Ldev/inmo/tgbotapi/types/message/ChatEvents/suggested/SuggestedPostInfo;
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
}
public final class dev/inmo/tgbotapi/types/message/HTMLParseMode : dev/inmo/tgbotapi/types/message/ParseMode {
public static final field INSTANCE Ldev/inmo/tgbotapi/types/message/HTMLParseMode;
public fun getParseModeName ()Ljava/lang/String;
@@ -24250,6 +24363,19 @@ public final class dev/inmo/tgbotapi/types/message/abstracts/CommonMessage$Defau
public static fun getReplyTo (Ldev/inmo/tgbotapi/types/message/abstracts/CommonMessage;)Ldev/inmo/tgbotapi/types/message/abstracts/Message;
}
public abstract interface class dev/inmo/tgbotapi/types/message/abstracts/CommonSuggestedChannelDirectMessagesContentMessage : dev/inmo/tgbotapi/types/message/abstracts/FromUserMessage, dev/inmo/tgbotapi/types/message/abstracts/PotentiallyFromUserGroupContentMessage, dev/inmo/tgbotapi/types/message/abstracts/SuggestedChannelDirectMessagesContentMessage {
}
public final class dev/inmo/tgbotapi/types/message/abstracts/CommonSuggestedChannelDirectMessagesContentMessage$DefaultImpls {
public static fun getBusinessConnectionId-nXr5wdE (Ldev/inmo/tgbotapi/types/message/abstracts/CommonSuggestedChannelDirectMessagesContentMessage;)Ljava/lang/String;
public static fun getDirectMessageThreadId-_JBF_Q4 (Ldev/inmo/tgbotapi/types/message/abstracts/CommonSuggestedChannelDirectMessagesContentMessage;)J
public static fun getForwardInfo (Ldev/inmo/tgbotapi/types/message/abstracts/CommonSuggestedChannelDirectMessagesContentMessage;)Ldev/inmo/tgbotapi/types/message/ForwardInfo;
public static fun getForwardable (Ldev/inmo/tgbotapi/types/message/abstracts/CommonSuggestedChannelDirectMessagesContentMessage;)Z
public static fun getMetaInfo-fV8YnZ8 (Ldev/inmo/tgbotapi/types/message/abstracts/CommonSuggestedChannelDirectMessagesContentMessage;)Lkotlin/Triple;
public static fun getReplyTo (Ldev/inmo/tgbotapi/types/message/abstracts/CommonSuggestedChannelDirectMessagesContentMessage;)Ldev/inmo/tgbotapi/types/message/abstracts/Message;
public static fun getUser (Ldev/inmo/tgbotapi/types/message/abstracts/CommonSuggestedChannelDirectMessagesContentMessage;)Ldev/inmo/tgbotapi/types/chat/User;
}
public abstract interface class dev/inmo/tgbotapi/types/message/abstracts/ConnectedFromChannelGroupContentMessage : dev/inmo/tgbotapi/types/message/abstracts/FromChannelGroupContentMessage {
}
@@ -24330,6 +24456,19 @@ public final class dev/inmo/tgbotapi/types/message/abstracts/FromChannelGroupCon
public static fun getSenderChat (Ldev/inmo/tgbotapi/types/message/abstracts/FromChannelGroupContentMessage;)Ldev/inmo/tgbotapi/types/chat/PreviewChannelChat;
}
public abstract interface class dev/inmo/tgbotapi/types/message/abstracts/FromChannelSuggestedChannelDirectMessagesContentMessage : dev/inmo/tgbotapi/types/message/abstracts/FromChannelGroupContentMessage, dev/inmo/tgbotapi/types/message/abstracts/SuggestedChannelDirectMessagesContentMessage {
}
public final class dev/inmo/tgbotapi/types/message/abstracts/FromChannelSuggestedChannelDirectMessagesContentMessage$DefaultImpls {
public static fun getBusinessConnectionId-nXr5wdE (Ldev/inmo/tgbotapi/types/message/abstracts/FromChannelSuggestedChannelDirectMessagesContentMessage;)Ljava/lang/String;
public static fun getDirectMessageThreadId-_JBF_Q4 (Ldev/inmo/tgbotapi/types/message/abstracts/FromChannelSuggestedChannelDirectMessagesContentMessage;)J
public static fun getForwardInfo (Ldev/inmo/tgbotapi/types/message/abstracts/FromChannelSuggestedChannelDirectMessagesContentMessage;)Ldev/inmo/tgbotapi/types/message/ForwardInfo;
public static fun getForwardable (Ldev/inmo/tgbotapi/types/message/abstracts/FromChannelSuggestedChannelDirectMessagesContentMessage;)Z
public static fun getMetaInfo-fV8YnZ8 (Ldev/inmo/tgbotapi/types/message/abstracts/FromChannelSuggestedChannelDirectMessagesContentMessage;)Lkotlin/Triple;
public static fun getReplyTo (Ldev/inmo/tgbotapi/types/message/abstracts/FromChannelSuggestedChannelDirectMessagesContentMessage;)Ldev/inmo/tgbotapi/types/message/abstracts/Message;
public static fun getSenderChat (Ldev/inmo/tgbotapi/types/message/abstracts/FromChannelSuggestedChannelDirectMessagesContentMessage;)Ldev/inmo/tgbotapi/types/chat/PreviewChannelChat;
}
public abstract interface class dev/inmo/tgbotapi/types/message/abstracts/FromUserMessage : dev/inmo/tgbotapi/abstracts/FromUser, dev/inmo/tgbotapi/types/message/abstracts/OptionallyFromUserMessage {
}
@@ -24609,6 +24748,19 @@ public final class dev/inmo/tgbotapi/types/message/abstracts/SignedMessage$Defau
public static fun getMetaInfo-fV8YnZ8 (Ldev/inmo/tgbotapi/types/message/abstracts/SignedMessage;)Lkotlin/Triple;
}
public abstract interface class dev/inmo/tgbotapi/types/message/abstracts/SuggestedChannelDirectMessagesContentMessage : dev/inmo/tgbotapi/types/message/abstracts/ChannelDirectMessagesContentMessage {
public abstract fun getSuggestedPostInfo ()Ldev/inmo/tgbotapi/types/message/ChatEvents/suggested/SuggestedPostInfo;
}
public final class dev/inmo/tgbotapi/types/message/abstracts/SuggestedChannelDirectMessagesContentMessage$DefaultImpls {
public static fun getBusinessConnectionId-nXr5wdE (Ldev/inmo/tgbotapi/types/message/abstracts/SuggestedChannelDirectMessagesContentMessage;)Ljava/lang/String;
public static fun getDirectMessageThreadId-_JBF_Q4 (Ldev/inmo/tgbotapi/types/message/abstracts/SuggestedChannelDirectMessagesContentMessage;)J
public static fun getForwardInfo (Ldev/inmo/tgbotapi/types/message/abstracts/SuggestedChannelDirectMessagesContentMessage;)Ldev/inmo/tgbotapi/types/message/ForwardInfo;
public static fun getForwardable (Ldev/inmo/tgbotapi/types/message/abstracts/SuggestedChannelDirectMessagesContentMessage;)Z
public static fun getMetaInfo-fV8YnZ8 (Ldev/inmo/tgbotapi/types/message/abstracts/SuggestedChannelDirectMessagesContentMessage;)Lkotlin/Triple;
public static fun getReplyTo (Ldev/inmo/tgbotapi/types/message/abstracts/SuggestedChannelDirectMessagesContentMessage;)Ldev/inmo/tgbotapi/types/message/abstracts/Message;
}
public abstract interface class dev/inmo/tgbotapi/types/message/abstracts/SupergroupEventMessage : dev/inmo/tgbotapi/types/message/abstracts/GroupEventMessage {
public abstract fun getChat ()Ldev/inmo/tgbotapi/types/chat/PreviewSupergroupChat;
}

View File

@@ -1,6 +1,5 @@
package dev.inmo.tgbotapi.types.message.ChatEvents.suggested
import dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.ChannelDirectMessagesEvent
import dev.inmo.tgbotapi.types.payments.SuggestedPostPrice
import dev.inmo.tgbotapi.types.priceField
import dev.inmo.tgbotapi.types.sendDateField
@@ -23,7 +22,7 @@ data class SuggestedPostInfo(
val price: SuggestedPostPrice? = null,
@SerialName(sendDateField)
val sendDate: Int? = null
) : ChannelDirectMessagesEvent {
) {
@Serializable(State.Companion::class)
sealed interface State {
val name: String

View File

@@ -6,6 +6,7 @@ import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
import dev.inmo.tgbotapi.types.chat.*
import dev.inmo.tgbotapi.types.chat.CommonBot
import dev.inmo.tgbotapi.types.chat.User
import dev.inmo.tgbotapi.types.message.ChatEvents.suggested.SuggestedPostInfo
import dev.inmo.tgbotapi.types.message.abstracts.*
import dev.inmo.tgbotapi.types.message.content.MessageContent
import kotlinx.serialization.SerialName
@@ -332,6 +333,65 @@ data class FromChannelChannelDirectMessagesContentMessageImpl<T: MessageContent>
)
}
data class FromChannelSuggestedChannelDirectMessagesContentMessageImpl<T: MessageContent>(
override val chat: PreviewChannelDirectMessagesChat,
override val channel: PreviewChannelChat,
override val messageId: MessageId,
override val date: DateTime,
override val directMessageTopic: DirectMessagesTopic,
override val forwardOrigin: MessageOrigin?,
override val editDate: DateTime?,
override val hasProtectedContent: Boolean,
override val replyInfo: ReplyInfo?,
override val replyMarkup: InlineKeyboardMarkup?,
override val content: T,
override val senderBot: CommonBot?,
override val authorSignature: AuthorSignature?,
override val mediaGroupId: MediaGroupId?,
override val fromOffline: Boolean,
override val suggestedPostInfo: SuggestedPostInfo,
@SerialName(paidMessageStarCountField)
override val cost: Int? = null,
) : FromChannelSuggestedChannelDirectMessagesContentMessage<T> {
constructor(
chat: PreviewChannelDirectMessagesChat,
channel: PreviewChannelChat,
messageId: MessageId,
date: DateTime,
directMessageTopic: DirectMessagesTopic,
forwardInfo: ForwardInfo,
editDate: DateTime?,
hasProtectedContent: Boolean,
replyTo: AccessibleMessage?,
replyMarkup: InlineKeyboardMarkup?,
content: T,
senderBot: CommonBot?,
authorSignature: AuthorSignature?,
mediaGroupId: MediaGroupId?,
fromOffline: Boolean,
suggestedPostInfo: SuggestedPostInfo,
cost: Int? = null,
) : this(
chat = chat,
channel = channel,
messageId = messageId,
date = date,
directMessageTopic = directMessageTopic,
forwardOrigin = forwardInfo.messageOrigin(),
editDate = editDate,
hasProtectedContent = hasProtectedContent,
replyInfo = replyTo ?.let { ReplyInfo.Internal(it) },
replyMarkup = replyMarkup,
content = content,
senderBot = senderBot,
authorSignature = authorSignature,
mediaGroupId = mediaGroupId,
fromOffline = fromOffline,
suggestedPostInfo = suggestedPostInfo,
cost = cost,
)
}
data class AnonymousForumContentMessageImpl<T : MessageContent>(
override val chat: PreviewForumChat,
override val messageId: MessageId,
@@ -497,3 +557,63 @@ data class CommonChannelDirectMessagesContentMessageImpl<T : MessageContent>(
cost = cost,
)
}
data class CommonSuggestedChannelDirectMessagesContentMessageImpl<T : MessageContent>(
override val chat: PreviewChannelDirectMessagesChat,
override val messageId: MessageId,
override val from: User,
override val date: DateTime,
override val directMessageTopic: DirectMessagesTopic,
override val forwardOrigin: MessageOrigin?,
override val editDate: DateTime?,
override val hasProtectedContent: Boolean,
override val replyInfo: ReplyInfo?,
override val replyMarkup: InlineKeyboardMarkup?,
override val content: T,
override val senderBot: CommonBot?,
override val mediaGroupId: MediaGroupId?,
override val senderBoostsCount: Int?,
override val fromOffline: Boolean,
override val suggestedPostInfo: SuggestedPostInfo,
@SerialName(paidMessageStarCountField)
override val cost: Int? = null
) : CommonSuggestedChannelDirectMessagesContentMessage<T> {
constructor(
chat: PreviewChannelDirectMessagesChat,
messageId: MessageId,
from: User,
date: DateTime,
directMessageTopic: DirectMessagesTopic,
forwardInfo: ForwardInfo,
editDate: DateTime?,
hasProtectedContent: Boolean,
replyTo: AccessibleMessage?,
replyMarkup: InlineKeyboardMarkup?,
content: T,
senderBot: CommonBot?,
mediaGroupId: MediaGroupId?,
senderBoostsCount: Int?,
fromOffline: Boolean,
suggestedPostInfo: SuggestedPostInfo,
cost: Int? = null,
) : this(
chat = chat,
messageId = messageId,
from = from,
date = date,
directMessageTopic = directMessageTopic,
forwardOrigin = forwardInfo.messageOrigin(),
editDate = editDate,
hasProtectedContent = hasProtectedContent,
replyInfo = replyTo ?.let { ReplyInfo.Internal(it) },
replyMarkup = replyMarkup,
content = content,
senderBot = senderBot,
mediaGroupId = mediaGroupId,
senderBoostsCount = senderBoostsCount,
fromOffline = fromOffline,
suggestedPostInfo = suggestedPostInfo,
cost = cost,
)
}

View File

@@ -331,7 +331,6 @@ internal data class RawMessage(
checklist_tasks_done != null -> checklist_tasks_done
checklist_tasks_added != null -> checklist_tasks_added
direct_message_price_changed != null -> direct_message_price_changed
suggested_post_info != null -> suggested_post_info
suggested_post_approved != null -> suggested_post_approved
suggested_post_approval_failed != null -> suggested_post_approval_failed
suggested_post_declined != null -> suggested_post_declined
@@ -408,44 +407,91 @@ internal data class RawMessage(
val actualForumChat = when (chat) {
is ChannelDirectMessagesChatImpl -> chat.copy(id = chatId)
}
when (sender_chat) {
is PreviewChannelChat -> FromChannelChannelDirectMessagesContentMessageImpl(
chat = actualForumChat,
channel = sender_chat,
messageId = messageId,
date = date.asDate,
directMessageTopic = direct_messages_topic,
forwardOrigin = forward_origin,
editDate = edit_date ?.asDate,
hasProtectedContent = has_protected_content == true,
replyInfo = replyInfo,
replyMarkup = reply_markup,
content = content,
senderBot = via_bot,
authorSignature = author_signature,
mediaGroupId = media_group_id,
fromOffline = is_from_offline,
cost = paid_star_count,
)
is PreviewGroupChat,
null -> CommonChannelDirectMessagesContentMessageImpl(
chat = actualForumChat,
messageId = messageId,
from = checkedFrom ?: from ?: error("It is expected that in direct channel messages from non anonymous channels user must be specified"),
date = date.asDate,
directMessageTopic = direct_messages_topic,
forwardOrigin = forward_origin,
editDate = edit_date ?.asDate,
hasProtectedContent = has_protected_content == true,
replyInfo = replyInfo,
replyMarkup = reply_markup,
content = content,
senderBot = via_bot,
mediaGroupId = media_group_id,
senderBoostsCount = sender_boost_count,
fromOffline = is_from_offline,
cost = paid_star_count,
)
when (suggested_post_info) {
null -> {
when (sender_chat) {
is PreviewChannelChat -> FromChannelChannelDirectMessagesContentMessageImpl(
chat = actualForumChat,
channel = sender_chat,
messageId = messageId,
date = date.asDate,
directMessageTopic = direct_messages_topic,
forwardOrigin = forward_origin,
editDate = edit_date ?.asDate,
hasProtectedContent = has_protected_content == true,
replyInfo = replyInfo,
replyMarkup = reply_markup,
content = content,
senderBot = via_bot,
authorSignature = author_signature,
mediaGroupId = media_group_id,
fromOffline = is_from_offline,
cost = paid_star_count,
)
is PreviewGroupChat,
null -> CommonChannelDirectMessagesContentMessageImpl(
chat = actualForumChat,
messageId = messageId,
from = checkedFrom ?: from ?: error("It is expected that in direct channel messages from non anonymous channels user must be specified"),
date = date.asDate,
directMessageTopic = direct_messages_topic,
forwardOrigin = forward_origin,
editDate = edit_date ?.asDate,
hasProtectedContent = has_protected_content == true,
replyInfo = replyInfo,
replyMarkup = reply_markup,
content = content,
senderBot = via_bot,
mediaGroupId = media_group_id,
senderBoostsCount = sender_boost_count,
fromOffline = is_from_offline,
cost = paid_star_count,
)
}
}
else -> {
when (sender_chat) {
is PreviewChannelChat -> FromChannelSuggestedChannelDirectMessagesContentMessageImpl(
chat = actualForumChat,
channel = sender_chat,
messageId = messageId,
date = date.asDate,
directMessageTopic = direct_messages_topic,
forwardOrigin = forward_origin,
editDate = edit_date ?.asDate,
hasProtectedContent = has_protected_content == true,
replyInfo = replyInfo,
replyMarkup = reply_markup,
content = content,
senderBot = via_bot,
authorSignature = author_signature,
mediaGroupId = media_group_id,
fromOffline = is_from_offline,
suggestedPostInfo = suggested_post_info,
cost = paid_star_count,
)
is PreviewGroupChat,
null -> CommonSuggestedChannelDirectMessagesContentMessageImpl(
chat = actualForumChat,
messageId = messageId,
from = checkedFrom ?: from ?: error("It is expected that in direct channel messages from non anonymous channels user must be specified"),
date = date.asDate,
directMessageTopic = direct_messages_topic,
forwardOrigin = forward_origin,
editDate = edit_date ?.asDate,
hasProtectedContent = has_protected_content == true,
replyInfo = replyInfo,
replyMarkup = reply_markup,
content = content,
senderBot = via_bot,
mediaGroupId = media_group_id,
senderBoostsCount = sender_boost_count,
fromOffline = is_from_offline,
suggestedPostInfo = suggested_post_info,
cost = paid_star_count,
)
}
}
}
}
is PreviewPublicChat -> when (chat) {

View File

@@ -5,6 +5,7 @@ import dev.inmo.tgbotapi.types.DirectMessageThreadId
import dev.inmo.tgbotapi.types.MessageThreadId
import dev.inmo.tgbotapi.types.chat.*
import dev.inmo.tgbotapi.types.message.ChatEvents.forum.ForumTopicCreated
import dev.inmo.tgbotapi.types.message.ChatEvents.suggested.SuggestedPostInfo
import dev.inmo.tgbotapi.types.message.content.MessageContent
sealed interface GroupContentMessage<T : MessageContent> : PublicContentMessage<T> {
@@ -29,6 +30,9 @@ sealed interface ChannelDirectMessagesContentMessage<T : MessageContent> : Group
val directMessageThreadId: DirectMessageThreadId
get() = directMessageTopic.threadId
}
sealed interface SuggestedChannelDirectMessagesContentMessage<T : MessageContent> : ChannelDirectMessagesContentMessage<T> {
val suggestedPostInfo: SuggestedPostInfo
}
sealed interface FromChannelGroupContentMessage<T : MessageContent> : GroupContentMessage<T>, SignedMessage, WithSenderChatMessage {
val channel: PreviewChannelChat
@@ -50,6 +54,8 @@ interface FromChannelForumContentMessage<T: MessageContent> : FromChannelGroupCo
interface FromChannelChannelDirectMessagesContentMessage<T: MessageContent> : FromChannelGroupContentMessage<T>, ChannelDirectMessagesContentMessage<T>
interface FromChannelSuggestedChannelDirectMessagesContentMessage<T: MessageContent> : FromChannelGroupContentMessage<T>, SuggestedChannelDirectMessagesContentMessage<T>
interface AnonymousForumContentMessage<T : MessageContent> : ForumContentMessage<T>, SignedMessage, WithSenderChatMessage {
override val senderChat: PreviewGroupChat
get() = chat
@@ -58,3 +64,5 @@ interface AnonymousForumContentMessage<T : MessageContent> : ForumContentMessage
interface CommonForumContentMessage<T : MessageContent> : ForumContentMessage<T>, PotentiallyFromUserGroupContentMessage<T>, FromUserMessage
interface CommonChannelDirectMessagesContentMessage<T : MessageContent> : ChannelDirectMessagesContentMessage<T>, PotentiallyFromUserGroupContentMessage<T>, FromUserMessage
interface CommonSuggestedChannelDirectMessagesContentMessage<T : MessageContent> : SuggestedChannelDirectMessagesContentMessage<T>, PotentiallyFromUserGroupContentMessage<T>, FromUserMessage

View File

@@ -224,5 +224,44 @@ fun <T : MediaGroupPartContent> List<PossiblySentViaBotCommonMessage<T>>.asMedia
fromOffline = sourceMessage.fromOffline,
cost = sourceMessage.cost,
)
is CommonSuggestedChannelDirectMessagesContentMessage<*> -> CommonSuggestedChannelDirectMessagesContentMessageImpl(
chat = sourceMessage.chat,
messageId = sourceMessage.messageId,
from = sourceMessage.user,
date = sourceMessage.date,
directMessageTopic = sourceMessage.directMessageTopic,
forwardOrigin = sourceMessage.forwardOrigin,
editDate = sourceMessage.editDate,
hasProtectedContent = sourceMessage.hasProtectedContent,
replyInfo = sourceMessage.replyInfo,
replyMarkup = sourceMessage.replyMarkup,
content = content,
senderBot = sourceMessage.senderBot,
mediaGroupId = sourceMessage.mediaGroupId,
senderBoostsCount = sourceMessage.senderBoostsCount,
fromOffline = sourceMessage.fromOffline,
suggestedPostInfo = sourceMessage.suggestedPostInfo,
cost = sourceMessage.cost,
)
is FromChannelSuggestedChannelDirectMessagesContentMessage<*> -> FromChannelSuggestedChannelDirectMessagesContentMessageImpl(
chat = sourceMessage.chat,
channel = sourceMessage.channel,
messageId = sourceMessage.messageId,
date = sourceMessage.date,
directMessageTopic = sourceMessage.directMessageTopic,
forwardOrigin = sourceMessage.forwardOrigin,
editDate = sourceMessage.editDate,
hasProtectedContent = sourceMessage.hasProtectedContent,
replyInfo = sourceMessage.replyInfo,
replyMarkup = sourceMessage.replyMarkup,
content = content,
senderBot = sourceMessage.senderBot,
authorSignature = sourceMessage.authorSignature,
mediaGroupId = sourceMessage.mediaGroupId,
fromOffline = sourceMessage.fromOffline,
suggestedPostInfo = sourceMessage.suggestedPostInfo,
cost = sourceMessage.cost,
)
}
}

View File

@@ -1281,6 +1281,10 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsNewKt {
public static final fun commonPassportOrThrow (Ldev/inmo/tgbotapi/types/passport/encrypted/abstracts/EncryptedPassportElement;)Ldev/inmo/tgbotapi/types/passport/encrypted/CommonPassport;
public static final fun commonPassportSecureValueOrNull (Ldev/inmo/tgbotapi/types/passport/decrypted/abstracts/SecureValue;)Ldev/inmo/tgbotapi/types/passport/decrypted/CommonPassportSecureValue;
public static final fun commonPassportSecureValueOrThrow (Ldev/inmo/tgbotapi/types/passport/decrypted/abstracts/SecureValue;)Ldev/inmo/tgbotapi/types/passport/decrypted/CommonPassportSecureValue;
public static final fun commonSuggestedChannelDirectMessagesContentMessageOrNull (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;)Ldev/inmo/tgbotapi/types/message/abstracts/CommonSuggestedChannelDirectMessagesContentMessage;
public static final fun commonSuggestedChannelDirectMessagesContentMessageOrNull (Ldev/inmo/tgbotapi/types/message/abstracts/Message;)Ldev/inmo/tgbotapi/types/message/abstracts/CommonSuggestedChannelDirectMessagesContentMessage;
public static final fun commonSuggestedChannelDirectMessagesContentMessageOrThrow (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;)Ldev/inmo/tgbotapi/types/message/abstracts/CommonSuggestedChannelDirectMessagesContentMessage;
public static final fun commonSuggestedChannelDirectMessagesContentMessageOrThrow (Ldev/inmo/tgbotapi/types/message/abstracts/Message;)Ldev/inmo/tgbotapi/types/message/abstracts/CommonSuggestedChannelDirectMessagesContentMessage;
public static final fun commonSupergroupEventMessageOrNull (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;)Ldev/inmo/tgbotapi/types/message/CommonSupergroupEventMessage;
public static final fun commonSupergroupEventMessageOrNull (Ldev/inmo/tgbotapi/types/message/abstracts/Message;)Ldev/inmo/tgbotapi/types/message/CommonSupergroupEventMessage;
public static final fun commonSupergroupEventMessageOrThrow (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;)Ldev/inmo/tgbotapi/types/message/CommonSupergroupEventMessage;
@@ -1477,6 +1481,8 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsNewKt {
public static final fun fromChannelGroupContentMessageOrThrow (Ldev/inmo/tgbotapi/types/message/abstracts/Message;)Ldev/inmo/tgbotapi/types/message/abstracts/FromChannelGroupContentMessage;
public static final fun fromChannelOrNull (Ldev/inmo/tgbotapi/types/message/ForwardInfo;)Ldev/inmo/tgbotapi/types/message/ForwardInfo$PublicChat$FromChannel;
public static final fun fromChannelOrThrow (Ldev/inmo/tgbotapi/types/message/ForwardInfo;)Ldev/inmo/tgbotapi/types/message/ForwardInfo$PublicChat$FromChannel;
public static final fun fromChannelSuggestedChannelDirectMessagesContentMessageOrNull (Ldev/inmo/tgbotapi/types/message/abstracts/Message;)Ldev/inmo/tgbotapi/types/message/abstracts/FromChannelSuggestedChannelDirectMessagesContentMessage;
public static final fun fromChannelSuggestedChannelDirectMessagesContentMessageOrThrow (Ldev/inmo/tgbotapi/types/message/abstracts/Message;)Ldev/inmo/tgbotapi/types/message/abstracts/FromChannelSuggestedChannelDirectMessagesContentMessage;
public static final fun fromSupergroupOrNull (Ldev/inmo/tgbotapi/types/message/ForwardInfo;)Ldev/inmo/tgbotapi/types/message/ForwardInfo$PublicChat$FromSupergroup;
public static final fun fromSupergroupOrThrow (Ldev/inmo/tgbotapi/types/message/ForwardInfo;)Ldev/inmo/tgbotapi/types/message/ForwardInfo$PublicChat$FromSupergroup;
public static final fun fromUserMessageOrNull (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;)Ldev/inmo/tgbotapi/types/message/abstracts/FromUserMessage;
@@ -1667,6 +1673,8 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsNewKt {
public static final fun ifCommonMessage (Ldev/inmo/tgbotapi/types/message/abstracts/Message;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifCommonPassport (Ldev/inmo/tgbotapi/types/passport/encrypted/abstracts/EncryptedPassportElement;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifCommonPassportSecureValue (Ldev/inmo/tgbotapi/types/passport/decrypted/abstracts/SecureValue;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifCommonSuggestedChannelDirectMessagesContentMessage (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifCommonSuggestedChannelDirectMessagesContentMessage (Ldev/inmo/tgbotapi/types/message/abstracts/Message;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifCommonSupergroupEventMessage (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifCommonSupergroupEventMessage (Ldev/inmo/tgbotapi/types/message/abstracts/Message;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifCommonUser (Ldev/inmo/tgbotapi/types/chat/Chat;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
@@ -1765,6 +1773,7 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsNewKt {
public static final fun ifFromChannelChannelDirectMessagesContentMessage (Ldev/inmo/tgbotapi/types/message/abstracts/Message;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifFromChannelForumContentMessage (Ldev/inmo/tgbotapi/types/message/abstracts/Message;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifFromChannelGroupContentMessage (Ldev/inmo/tgbotapi/types/message/abstracts/Message;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifFromChannelSuggestedChannelDirectMessagesContentMessage (Ldev/inmo/tgbotapi/types/message/abstracts/Message;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifFromSupergroup (Ldev/inmo/tgbotapi/types/message/ForwardInfo;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifFromUser (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifFromUserMessage (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
@@ -2029,10 +2038,10 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsNewKt {
public static final fun ifSubscriptionMemberChatMember (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifSucceeded (Ldev/inmo/tgbotapi/types/payments/stars/RevenueWithdrawalState;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifSuccessfulPaymentEvent (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifSuggestedChannelDirectMessagesContentMessage (Ldev/inmo/tgbotapi/types/message/abstracts/Message;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifSuggestedPostApprovalFailed (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifSuggestedPostApproved (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifSuggestedPostDeclined (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifSuggestedPostInfo (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifSuggestedPostPaid (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifSuggestedPostPaidOther (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifSuggestedPostPaidTON (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
@@ -2597,14 +2606,14 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsNewKt {
public static final fun succeededOrThrow (Ldev/inmo/tgbotapi/types/payments/stars/RevenueWithdrawalState;)Ldev/inmo/tgbotapi/types/payments/stars/RevenueWithdrawalState$Succeeded;
public static final fun successfulPaymentEventOrNull (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/message/payments/SuccessfulPaymentEvent;
public static final fun successfulPaymentEventOrThrow (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/message/payments/SuccessfulPaymentEvent;
public static final fun suggestedChannelDirectMessagesContentMessageOrNull (Ldev/inmo/tgbotapi/types/message/abstracts/Message;)Ldev/inmo/tgbotapi/types/message/abstracts/SuggestedChannelDirectMessagesContentMessage;
public static final fun suggestedChannelDirectMessagesContentMessageOrThrow (Ldev/inmo/tgbotapi/types/message/abstracts/Message;)Ldev/inmo/tgbotapi/types/message/abstracts/SuggestedChannelDirectMessagesContentMessage;
public static final fun suggestedPostApprovalFailedOrNull (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/message/ChatEvents/suggested/SuggestedPostApprovalFailed;
public static final fun suggestedPostApprovalFailedOrThrow (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/message/ChatEvents/suggested/SuggestedPostApprovalFailed;
public static final fun suggestedPostApprovedOrNull (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/message/ChatEvents/suggested/SuggestedPostApproved;
public static final fun suggestedPostApprovedOrThrow (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/message/ChatEvents/suggested/SuggestedPostApproved;
public static final fun suggestedPostDeclinedOrNull (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/message/ChatEvents/suggested/SuggestedPostDeclined;
public static final fun suggestedPostDeclinedOrThrow (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/message/ChatEvents/suggested/SuggestedPostDeclined;
public static final fun suggestedPostInfoOrNull (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/message/ChatEvents/suggested/SuggestedPostInfo;
public static final fun suggestedPostInfoOrThrow (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/message/ChatEvents/suggested/SuggestedPostInfo;
public static final fun suggestedPostPaidOrNull (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/message/ChatEvents/suggested/SuggestedPostPaid;
public static final fun suggestedPostPaidOrThrow (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/message/ChatEvents/suggested/SuggestedPostPaid;
public static final fun suggestedPostPaidOtherOrNull (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/message/ChatEvents/suggested/SuggestedPostPaid$Other;

View File

@@ -289,7 +289,6 @@ import dev.inmo.tgbotapi.types.message.ChatEvents.forum.WriteAccessAllowed
import dev.inmo.tgbotapi.types.message.ChatEvents.suggested.SuggestedPostApprovalFailed
import dev.inmo.tgbotapi.types.message.ChatEvents.suggested.SuggestedPostApproved
import dev.inmo.tgbotapi.types.message.ChatEvents.suggested.SuggestedPostDeclined
import dev.inmo.tgbotapi.types.message.ChatEvents.suggested.SuggestedPostInfo
import dev.inmo.tgbotapi.types.message.ChatEvents.suggested.SuggestedPostPaid
import dev.inmo.tgbotapi.types.message.ChatEvents.suggested.SuggestedPostRefunded
import dev.inmo.tgbotapi.types.message.ChatEvents.voice.VideoChatEnded
@@ -315,12 +314,14 @@ import dev.inmo.tgbotapi.types.message.abstracts.CommonChannelDirectMessagesCont
import dev.inmo.tgbotapi.types.message.abstracts.CommonForumContentMessage
import dev.inmo.tgbotapi.types.message.abstracts.CommonGroupContentMessage
import dev.inmo.tgbotapi.types.message.abstracts.CommonMessage
import dev.inmo.tgbotapi.types.message.abstracts.CommonSuggestedChannelDirectMessagesContentMessage
import dev.inmo.tgbotapi.types.message.abstracts.ConnectedFromChannelGroupContentMessage
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.abstracts.ForumContentMessage
import dev.inmo.tgbotapi.types.message.abstracts.FromChannelChannelDirectMessagesContentMessage
import dev.inmo.tgbotapi.types.message.abstracts.FromChannelForumContentMessage
import dev.inmo.tgbotapi.types.message.abstracts.FromChannelGroupContentMessage
import dev.inmo.tgbotapi.types.message.abstracts.FromChannelSuggestedChannelDirectMessagesContentMessage
import dev.inmo.tgbotapi.types.message.abstracts.FromUserMessage
import dev.inmo.tgbotapi.types.message.abstracts.GroupContentMessage
import dev.inmo.tgbotapi.types.message.abstracts.GroupEventMessage
@@ -340,6 +341,7 @@ import dev.inmo.tgbotapi.types.message.abstracts.PotentiallyFromUserGroupContent
import dev.inmo.tgbotapi.types.message.abstracts.PrivateContentMessage
import dev.inmo.tgbotapi.types.message.abstracts.PublicContentMessage
import dev.inmo.tgbotapi.types.message.abstracts.SignedMessage
import dev.inmo.tgbotapi.types.message.abstracts.SuggestedChannelDirectMessagesContentMessage
import dev.inmo.tgbotapi.types.message.abstracts.SupergroupEventMessage
import dev.inmo.tgbotapi.types.message.abstracts.UnconnectedFromChannelGroupContentMessage
import dev.inmo.tgbotapi.types.message.abstracts.UnknownMessageType
@@ -812,6 +814,12 @@ public inline fun OptionallyWithUser.commonChannelDirectMessagesContentMessageOr
public inline fun <T> OptionallyWithUser.ifCommonChannelDirectMessagesContentMessage(block: (CommonChannelDirectMessagesContentMessage<MessageContent>) -> T): T? = commonChannelDirectMessagesContentMessageOrNull() ?.let(block)
public inline fun OptionallyWithUser.commonSuggestedChannelDirectMessagesContentMessageOrNull(): CommonSuggestedChannelDirectMessagesContentMessage<MessageContent>? = this as? dev.inmo.tgbotapi.types.message.abstracts.CommonSuggestedChannelDirectMessagesContentMessage<dev.inmo.tgbotapi.types.message.content.MessageContent>
public inline fun OptionallyWithUser.commonSuggestedChannelDirectMessagesContentMessageOrThrow(): CommonSuggestedChannelDirectMessagesContentMessage<MessageContent> = this as dev.inmo.tgbotapi.types.message.abstracts.CommonSuggestedChannelDirectMessagesContentMessage<dev.inmo.tgbotapi.types.message.content.MessageContent>
public inline fun <T> OptionallyWithUser.ifCommonSuggestedChannelDirectMessagesContentMessage(block: (CommonSuggestedChannelDirectMessagesContentMessage<MessageContent>) -> T): T? = commonSuggestedChannelDirectMessagesContentMessageOrNull() ?.let(block)
public inline fun OptionallyWithUser.privateContentMessageOrNull(): PrivateContentMessage<MessageContent>? = this as? dev.inmo.tgbotapi.types.message.abstracts.PrivateContentMessage<dev.inmo.tgbotapi.types.message.content.MessageContent>
public inline fun OptionallyWithUser.privateContentMessageOrThrow(): PrivateContentMessage<MessageContent> = this as dev.inmo.tgbotapi.types.message.abstracts.PrivateContentMessage<dev.inmo.tgbotapi.types.message.content.MessageContent>
@@ -2654,12 +2662,6 @@ public inline fun ChatEvent.suggestedPostDeclinedOrThrow(): SuggestedPostDecline
public inline fun <T> ChatEvent.ifSuggestedPostDeclined(block: (SuggestedPostDeclined) -> T): T? = suggestedPostDeclinedOrNull() ?.let(block)
public inline fun ChatEvent.suggestedPostInfoOrNull(): SuggestedPostInfo? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.suggested.SuggestedPostInfo
public inline fun ChatEvent.suggestedPostInfoOrThrow(): SuggestedPostInfo = this as dev.inmo.tgbotapi.types.message.ChatEvents.suggested.SuggestedPostInfo
public inline fun <T> ChatEvent.ifSuggestedPostInfo(block: (SuggestedPostInfo) -> T): T? = suggestedPostInfoOrNull() ?.let(block)
public inline fun ChatEvent.suggestedPostPaidOrNull(): SuggestedPostPaid? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.suggested.SuggestedPostPaid
public inline fun ChatEvent.suggestedPostPaidOrThrow(): SuggestedPostPaid = this as dev.inmo.tgbotapi.types.message.ChatEvents.suggested.SuggestedPostPaid
@@ -2900,6 +2902,12 @@ public inline fun Message.channelDirectMessagesContentMessageOrThrow(): ChannelD
public inline fun <T> Message.ifChannelDirectMessagesContentMessage(block: (ChannelDirectMessagesContentMessage<MessageContent>) -> T): T? = channelDirectMessagesContentMessageOrNull() ?.let(block)
public inline fun Message.suggestedChannelDirectMessagesContentMessageOrNull(): SuggestedChannelDirectMessagesContentMessage<MessageContent>? = this as? dev.inmo.tgbotapi.types.message.abstracts.SuggestedChannelDirectMessagesContentMessage<dev.inmo.tgbotapi.types.message.content.MessageContent>
public inline fun Message.suggestedChannelDirectMessagesContentMessageOrThrow(): SuggestedChannelDirectMessagesContentMessage<MessageContent> = this as dev.inmo.tgbotapi.types.message.abstracts.SuggestedChannelDirectMessagesContentMessage<dev.inmo.tgbotapi.types.message.content.MessageContent>
public inline fun <T> Message.ifSuggestedChannelDirectMessagesContentMessage(block: (SuggestedChannelDirectMessagesContentMessage<MessageContent>) -> T): T? = suggestedChannelDirectMessagesContentMessageOrNull() ?.let(block)
public inline fun Message.fromChannelGroupContentMessageOrNull(): FromChannelGroupContentMessage<MessageContent>? = this as? dev.inmo.tgbotapi.types.message.abstracts.FromChannelGroupContentMessage<dev.inmo.tgbotapi.types.message.content.MessageContent>
public inline fun Message.fromChannelGroupContentMessageOrThrow(): FromChannelGroupContentMessage<MessageContent> = this as dev.inmo.tgbotapi.types.message.abstracts.FromChannelGroupContentMessage<dev.inmo.tgbotapi.types.message.content.MessageContent>
@@ -2942,6 +2950,12 @@ public inline fun Message.fromChannelChannelDirectMessagesContentMessageOrThrow(
public inline fun <T> Message.ifFromChannelChannelDirectMessagesContentMessage(block: (FromChannelChannelDirectMessagesContentMessage<MessageContent>) -> T): T? = fromChannelChannelDirectMessagesContentMessageOrNull() ?.let(block)
public inline fun Message.fromChannelSuggestedChannelDirectMessagesContentMessageOrNull(): FromChannelSuggestedChannelDirectMessagesContentMessage<MessageContent>? = this as? dev.inmo.tgbotapi.types.message.abstracts.FromChannelSuggestedChannelDirectMessagesContentMessage<dev.inmo.tgbotapi.types.message.content.MessageContent>
public inline fun Message.fromChannelSuggestedChannelDirectMessagesContentMessageOrThrow(): FromChannelSuggestedChannelDirectMessagesContentMessage<MessageContent> = this as dev.inmo.tgbotapi.types.message.abstracts.FromChannelSuggestedChannelDirectMessagesContentMessage<dev.inmo.tgbotapi.types.message.content.MessageContent>
public inline fun <T> Message.ifFromChannelSuggestedChannelDirectMessagesContentMessage(block: (FromChannelSuggestedChannelDirectMessagesContentMessage<MessageContent>) -> T): T? = fromChannelSuggestedChannelDirectMessagesContentMessageOrNull() ?.let(block)
public inline fun Message.anonymousForumContentMessageOrNull(): AnonymousForumContentMessage<MessageContent>? = this as? dev.inmo.tgbotapi.types.message.abstracts.AnonymousForumContentMessage<dev.inmo.tgbotapi.types.message.content.MessageContent>
public inline fun Message.anonymousForumContentMessageOrThrow(): AnonymousForumContentMessage<MessageContent> = this as dev.inmo.tgbotapi.types.message.abstracts.AnonymousForumContentMessage<dev.inmo.tgbotapi.types.message.content.MessageContent>
@@ -2960,6 +2974,12 @@ public inline fun Message.commonChannelDirectMessagesContentMessageOrThrow(): Co
public inline fun <T> Message.ifCommonChannelDirectMessagesContentMessage(block: (CommonChannelDirectMessagesContentMessage<MessageContent>) -> T): T? = commonChannelDirectMessagesContentMessageOrNull() ?.let(block)
public inline fun Message.commonSuggestedChannelDirectMessagesContentMessageOrNull(): CommonSuggestedChannelDirectMessagesContentMessage<MessageContent>? = this as? dev.inmo.tgbotapi.types.message.abstracts.CommonSuggestedChannelDirectMessagesContentMessage<dev.inmo.tgbotapi.types.message.content.MessageContent>
public inline fun Message.commonSuggestedChannelDirectMessagesContentMessageOrThrow(): CommonSuggestedChannelDirectMessagesContentMessage<MessageContent> = this as dev.inmo.tgbotapi.types.message.abstracts.CommonSuggestedChannelDirectMessagesContentMessage<dev.inmo.tgbotapi.types.message.content.MessageContent>
public inline fun <T> Message.ifCommonSuggestedChannelDirectMessagesContentMessage(block: (CommonSuggestedChannelDirectMessagesContentMessage<MessageContent>) -> T): T? = commonSuggestedChannelDirectMessagesContentMessageOrNull() ?.let(block)
public inline fun Message.accessibleMessageOrNull(): AccessibleMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.AccessibleMessage
public inline fun Message.accessibleMessageOrThrow(): AccessibleMessage = this as dev.inmo.tgbotapi.types.message.abstracts.AccessibleMessage