mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2026-03-03 09:22:22 +00:00
improve repostStory
This commit is contained in:
@@ -2,6 +2,7 @@ package dev.inmo.tgbotapi.extensions.api.stories
|
|||||||
|
|
||||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||||
import dev.inmo.tgbotapi.requests.stories.RepostStory
|
import dev.inmo.tgbotapi.requests.stories.RepostStory
|
||||||
|
import dev.inmo.tgbotapi.types.BusinessChatId
|
||||||
import dev.inmo.tgbotapi.types.IdChatIdentifier
|
import dev.inmo.tgbotapi.types.IdChatIdentifier
|
||||||
import dev.inmo.tgbotapi.types.Seconds
|
import dev.inmo.tgbotapi.types.Seconds
|
||||||
import dev.inmo.tgbotapi.types.StoryId
|
import dev.inmo.tgbotapi.types.StoryId
|
||||||
@@ -25,3 +26,20 @@ public suspend fun TelegramBot.repostStory(
|
|||||||
protectContent = protectContent
|
protectContent = protectContent
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
public suspend fun TelegramBot.repostStory(
|
||||||
|
fromChatId: BusinessChatId,
|
||||||
|
storyId: StoryId,
|
||||||
|
activePeriod: Seconds,
|
||||||
|
postToChatPage: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
|
): Story = execute(
|
||||||
|
RepostStory(
|
||||||
|
businessConnectionId = fromChatId.businessConnectionId,
|
||||||
|
fromChatId = fromChatId,
|
||||||
|
storyId = storyId,
|
||||||
|
activePeriod = activePeriod,
|
||||||
|
postToChatPage = postToChatPage,
|
||||||
|
protectContent = protectContent
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user