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

add ChecklistTasksAdded and ChecklistTasksDone events

This commit is contained in:
2025-07-07 21:19:17 +06:00
parent e53b3b8198
commit db8bac9b52
10 changed files with 204 additions and 2 deletions

View File

@@ -1219,6 +1219,10 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsNewKt {
public static final fun chatThemeOrThrow (Ldev/inmo/tgbotapi/types/BackgroundType;)Ldev/inmo/tgbotapi/types/BackgroundType$ChatTheme;
public static final fun checklistContentOrNull (Ldev/inmo/tgbotapi/types/message/content/ResendableContent;)Ldev/inmo/tgbotapi/types/message/content/ChecklistContent;
public static final fun checklistContentOrThrow (Ldev/inmo/tgbotapi/types/message/content/ResendableContent;)Ldev/inmo/tgbotapi/types/message/content/ChecklistContent;
public static final fun checklistTasksAddedOrNull (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/checklists/ChecklistTasksAdded;
public static final fun checklistTasksAddedOrThrow (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/checklists/ChecklistTasksAdded;
public static final fun checklistTasksDoneOrNull (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/checklists/ChecklistTasksDone;
public static final fun checklistTasksDoneOrThrow (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/checklists/ChecklistTasksDone;
public static final fun chooseStickerActionOrNull (Ldev/inmo/tgbotapi/types/actions/BotAction;)Ldev/inmo/tgbotapi/types/actions/ChooseStickerAction;
public static final fun chooseStickerActionOrThrow (Ldev/inmo/tgbotapi/types/actions/BotAction;)Ldev/inmo/tgbotapi/types/actions/ChooseStickerAction;
public static final fun chosenInlineResultOrNull (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;)Ldev/inmo/tgbotapi/types/InlineQueries/ChosenInlineResult/ChosenInlineResult;
@@ -1594,6 +1598,8 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsNewKt {
public static final fun ifChatSharedRequest (Ldev/inmo/tgbotapi/types/request/RequestResponse;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifChatTheme (Ldev/inmo/tgbotapi/types/BackgroundType;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifChecklistContent (Ldev/inmo/tgbotapi/types/message/content/ResendableContent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifChecklistTasksAdded (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifChecklistTasksDone (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifChooseStickerAction (Ldev/inmo/tgbotapi/types/actions/BotAction;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifChosenInlineResult (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public static final fun ifChosenInlineResultUpdate (Ldev/inmo/tgbotapi/types/update/abstracts/Update;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;

View File

@@ -173,6 +173,8 @@ import dev.inmo.tgbotapi.types.chat.member.RestrictedChatMember
import dev.inmo.tgbotapi.types.chat.member.RestrictedMemberChatMember
import dev.inmo.tgbotapi.types.chat.member.SpecialRightsChatMember
import dev.inmo.tgbotapi.types.chat.member.SubscriptionMemberChatMember
import dev.inmo.tgbotapi.types.checklists.ChecklistTasksAdded
import dev.inmo.tgbotapi.types.checklists.ChecklistTasksDone
import dev.inmo.tgbotapi.types.dice.BasketballDiceAnimationType
import dev.inmo.tgbotapi.types.dice.BowlingDiceAnimationType
import dev.inmo.tgbotapi.types.dice.CubeDiceAnimationType
@@ -3349,6 +3351,24 @@ public inline fun ChatEvent.chatBackgroundOrThrow(): ChatBackground = this as
public inline fun <T> ChatEvent.ifChatBackground(block: (ChatBackground) -> T): T? =
chatBackgroundOrNull() ?.let(block)
public inline fun ChatEvent.checklistTasksAddedOrNull(): ChecklistTasksAdded? = this as?
dev.inmo.tgbotapi.types.checklists.ChecklistTasksAdded
public inline fun ChatEvent.checklistTasksAddedOrThrow(): ChecklistTasksAdded = this as
dev.inmo.tgbotapi.types.checklists.ChecklistTasksAdded
public inline fun <T> ChatEvent.ifChecklistTasksAdded(block: (ChecklistTasksAdded) -> T): T? =
checklistTasksAddedOrNull() ?.let(block)
public inline fun ChatEvent.checklistTasksDoneOrNull(): ChecklistTasksDone? = this as?
dev.inmo.tgbotapi.types.checklists.ChecklistTasksDone
public inline fun ChatEvent.checklistTasksDoneOrThrow(): ChecklistTasksDone = this as
dev.inmo.tgbotapi.types.checklists.ChecklistTasksDone
public inline fun <T> ChatEvent.ifChecklistTasksDone(block: (ChecklistTasksDone) -> T): T? =
checklistTasksDoneOrNull() ?.let(block)
public inline fun ChatEvent.giftSentOrReceivedOrNull(): GiftSentOrReceived? = this as?
dev.inmo.tgbotapi.types.gifts.GiftSentOrReceived