Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract override val chatId: ChatIdentifier
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract val parseMode: ParseMode?
Link copied to clipboard
abstract val protectContent: Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract val requestSerializer: SerializationStrategy<*>
Link copied to clipboard
abstract val resultDeserializer: DeserializationStrategy<T>
Link copied to clipboard
abstract val text: String?
Link copied to clipboard
abstract val textSources: List<TextSource>?

Full list of TextSources

Link copied to clipboard
abstract val threadId: MessageThreadId?

Functions

Link copied to clipboard
abstract 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: