ReplyParameters

@Serializable
data class ReplyParameters : WithMessageId, TextedInput(source)

Constructors

Link copied to clipboard
constructor(chatIdentifier: ChatIdentifier, messageId: MessageId, entities: TextSourcesList, allowSendingWithoutReply: Boolean? = null, quotePosition: Int? = null, checklistTaskId: ChecklistTaskId? = null, pollOptionId: PollOptionPersistentId? = null)
constructor(metaInfo: Message.MetaInfo, entities: TextSourcesList, allowSendingWithoutReply: Boolean? = null, quotePosition: Int? = null, checklistTaskId: ChecklistTaskId? = null, pollOptionId: PollOptionPersistentId? = null)
constructor(message: Message, entities: TextSourcesList, allowSendingWithoutReply: Boolean? = null, quotePosition: Int? = null, checklistTaskId: ChecklistTaskId? = null, pollOptionId: PollOptionPersistentId? = null)
constructor(chatIdentifier: ChatIdentifier, messageId: MessageId, quote: String, quoteParseMode: ParseMode, allowSendingWithoutReply: Boolean? = null, quotePosition: Int? = null, checklistTaskId: ChecklistTaskId? = null, pollOptionId: PollOptionPersistentId? = null)
constructor(metaInfo: Message.MetaInfo, quote: String, quoteParseMode: ParseMode, allowSendingWithoutReply: Boolean? = null, quotePosition: Int? = null, checklistTaskId: ChecklistTaskId? = null, pollOptionId: PollOptionPersistentId? = null)
constructor(message: Message, quote: String, quoteParseMode: ParseMode, allowSendingWithoutReply: Boolean? = null, quotePosition: Int? = null, checklistTaskId: ChecklistTaskId? = null, pollOptionId: PollOptionPersistentId? = null)
constructor(chatIdentifier: ChatIdentifier, messageId: MessageId, allowSendingWithoutReply: Boolean? = null, quotePosition: Int? = null, checklistTaskId: ChecklistTaskId? = null, pollOptionId: PollOptionPersistentId? = null)
constructor(metaInfo: Message.MetaInfo, allowSendingWithoutReply: Boolean? = null, quotePosition: Int? = null, checklistTaskId: ChecklistTaskId? = null, pollOptionId: PollOptionPersistentId? = null)
constructor(message: Message, allowSendingWithoutReply: Boolean? = null, quotePosition: Int? = null, checklistTaskId: ChecklistTaskId? = null, pollOptionId: PollOptionPersistentId? = null)

Properties

Link copied to clipboard
@SerialName(value = "allow_sending_without_reply")
val allowSendingWithoutReply: Boolean?
Link copied to clipboard
@SerialName(value = "chat_id")
val chatIdentifier: ChatIdentifier
Link copied to clipboard
@SerialName(value = "checklist_task_id")
val checklistTaskId: ChecklistTaskId?
Link copied to clipboard
@SerialName(value = "message_id")
open override val messageId: MessageId
Link copied to clipboard
@SerialName(value = "poll_option_id")
val pollOptionId: PollOptionPersistentId?
Link copied to clipboard
@SerialName(value = "quote")
val quote: String?
Link copied to clipboard
@SerialName(value = "quote_parse_mode")
val quoteParseMode: ParseMode?
Link copied to clipboard
@SerialName(value = "quote_position")
val quotePosition: Int?
Link copied to clipboard
open override val text: String?
Link copied to clipboard
open override val textSources: List<TextSource>

Full list of TextSources

Functions

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: