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

add support of deleteStory

This commit is contained in:
2025-05-10 10:28:32 +06:00
parent 3b4fa06924
commit c8c008edd3
4 changed files with 111 additions and 0 deletions

View File

@@ -2365,6 +2365,13 @@ public final class dev/inmo/tgbotapi/extensions/api/stickers/UploadStickerFileKt
public static final fun uploadStickerFile-4iNBclM (Ldev/inmo/tgbotapi/bot/RequestsExecutor;JLdev/inmo/tgbotapi/requests/abstracts/MultipartFile;Ldev/inmo/tgbotapi/types/StickerFormat;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
}
public final class dev/inmo/tgbotapi/extensions/api/stories/DeleteStoryKt {
public static final fun deleteStory (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/message/abstracts/BusinessContentMessage;Ldev/inmo/tgbotapi/types/stories/Story;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static final fun deleteStory-8HGAsC4 (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;JLkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static final fun deleteStory-CF6AVbg (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/message/abstracts/BusinessContentMessage;JLkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static final fun deleteStory-wC12z2M (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ldev/inmo/tgbotapi/types/stories/Story;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
}
public final class dev/inmo/tgbotapi/extensions/api/thumbs/SetCustomEmojiStickerSetThumbKt {
public static final fun setCustomEmojiStickerSetThumbnail-FMh0B1w (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/stickers/StickerSet;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static final fun setCustomEmojiStickerSetThumbnail-KofBPHw (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;

View File

@@ -0,0 +1,42 @@
package dev.inmo.tgbotapi.extensions.api.stories
import dev.inmo.tgbotapi.bot.TelegramBot
import dev.inmo.tgbotapi.requests.stories.DeleteStory
import dev.inmo.tgbotapi.types.StoryId
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
import dev.inmo.tgbotapi.types.message.abstracts.BusinessContentMessage
import dev.inmo.tgbotapi.types.stories.Story
/**
* Deletes a story from a business account
*/
public suspend fun TelegramBot.deleteStory(
businessConnectionId: BusinessConnectionId,
storyId: StoryId
): Boolean = execute(
DeleteStory(
businessConnectionId = businessConnectionId,
storyId = storyId
)
)
public suspend fun TelegramBot.deleteStory(
message: BusinessContentMessage<*>,
storyId: StoryId
): Boolean = deleteStory(
businessConnectionId = with(message) {message.businessConnectionId}, storyId = storyId
)
public suspend fun TelegramBot.deleteStory(
businessConnectionId: BusinessConnectionId,
story: Story
): Boolean = deleteStory(
businessConnectionId = businessConnectionId, storyId = with(story) {story.id}
)
public suspend fun TelegramBot.deleteStory(
message: BusinessContentMessage<*>,
story: Story
): Boolean = deleteStory(
message = message, storyId = with(story) {story.id}
)