PostStory

Constructors

Link copied to clipboard
constructor(businessConnectionId: BusinessConnectionId, content: InputStoryContent, activePeriod: Seconds, textSources: List<TextSource>, areas: List<StoryArea> = emptyList(), postToChatPage: Boolean = false, protectContent: Boolean = false)
constructor(businessConnectionId: BusinessConnectionId, content: InputStoryContent, activePeriod: Seconds, text: String, parseMode: ParseMode? = null, areas: List<StoryArea> = emptyList(), postToChatPage: Boolean = false, protectContent: Boolean = false)
constructor(businessConnectionId: BusinessConnectionId, content: InputStoryContent, activePeriod: Seconds, areas: List<StoryArea> = emptyList(), postToChatPage: Boolean = false, protectContent: Boolean = false)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
@SerialName(value = "active_period")
val activePeriod: Seconds
Link copied to clipboard
@SerialName(value = "areas")
val areas: List<StoryArea>
Link copied to clipboard
@SerialName(value = "business_connection_id")
open override val businessConnectionId: BusinessConnectionId
Link copied to clipboard
@SerialName(value = "content")
val content: InputStoryContent
Link copied to clipboard
open override val data: SimpleRequest<Story>
Link copied to clipboard
Link copied to clipboard
open override val mediaMap: Map<String, MultipartFile>
Link copied to clipboard
open override val paramsJson: JsonObject
Link copied to clipboard
@SerialName(value = "parse_mode")
open override val parseMode: ParseMode?
Link copied to clipboard
@SerialName(value = "post_to_chat_page")
val postToChatPage: Boolean
Link copied to clipboard
@SerialName(value = "protect_content")
val protectContent: Boolean
Link copied to clipboard
open override val requestSerializer: SerializationStrategy<*>
Link copied to clipboard
open override val resultDeserializer: DeserializationStrategy<Story>
Link copied to clipboard
@SerialName(value = "caption")
open override val text: String?
Link copied to clipboard
open override val textSources: List<TextSource>?

Full list of TextSources

Functions

Link copied to clipboard
open override fun method(): String
Link copied to clipboard
fun TextedWithTextSources.parseCommandsWithArgs(argsSeparator: Regex = TelegramBotCommandsDefaults.defaultArgsSeparatorRegex): Map<String, Array<String>>

Parse commands and their args. Logic will find command, get all subsequent data as args until new command

Link copied to clipboard

Parse text sources to find commands with their arguments. This method will skip all the text sources before first command and all following text sources until the next command will be guessed as an args of last found command

Link copied to clipboard
fun TextedWithTextSources.parseCommandsWithNamedArgs(argsSeparator: String, nameArgSeparator: Regex = TelegramBotCommandsDefaults.defaultNamesArgsSeparatorRegex): Map<String, List<Pair<String, String>>>
fun TextedWithTextSources.parseCommandsWithNamedArgs(argsSeparator: Regex = TelegramBotCommandsDefaults.defaultArgsSeparatorRegex, nameArgSeparator: Regex = TelegramBotCommandsDefaults.defaultNamesArgsSeparatorRegex): Map<String, List<Pair<String, String>>>

Uses parseCommandsWithArgs to create base argsSeparator split args for commands and map their as k-v pairs. Sample: