Properties

Link copied to clipboard
@SerialName(value = "allow_paid_broadcast")
open override val allowPaidBroadcast: Boolean
Link copied to clipboard
Link copied to clipboard
@SerialName(value = "audio")
val audio: InputFile
Link copied to clipboard
@SerialName(value = "business_connection_id")
open override val businessConnectionId: BusinessConnectionId?
Link copied to clipboard
@SerialName(value = "chat_id")
open override val chatId: ChatIdentifier
Link copied to clipboard
@EncodeDefault
@SerialName(value = "direct_messages_topic_id")
open override val directMessageThreadId: DirectMessageThreadId?
Link copied to clipboard
@SerialName(value = "disable_notification")
open override val disableNotification: Boolean
Link copied to clipboard
@SerialName(value = "duration")
open override val duration: Long?

Duration of media, usually in seconds

Link copied to clipboard
@SerialName(value = "message_effect_id")
open override val effectId: EffectId?
Link copied to clipboard
Link copied to clipboard
@SerialName(value = "parse_mode")
open override val parseMode: ParseMode?
Link copied to clipboard
@SerialName(value = "performer")
open override val performer: String?
Link copied to clipboard
@SerialName(value = "protect_content")
open override val protectContent: Boolean
Link copied to clipboard
@SerialName(value = "reply_markup")
open override val replyMarkup: KeyboardMarkup?
Link copied to clipboard
@SerialName(value = "reply_parameters")
open override val replyParameters: ReplyParameters?
Link copied to clipboard
Link copied to clipboard
open override val requestSerializer: SerializationStrategy<*>
Link copied to clipboard
open override val resultDeserializer: DeserializationStrategy<ChatContentMessage<AudioContent>>
Link copied to clipboard
@SerialName(value = "suggested_post_parameters")
open override val suggestedPostParameters: SuggestedPostParameters?
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

Link copied to clipboard
@SerialName(value = "message_thread_id")
@EncodeDefault
open override val threadId: MessageThreadId?
Link copied to clipboard
@SerialName(value = "thumbnail")
open override val thumbnail: String?
Link copied to clipboard
@SerialName(value = "title")
open override val title: String?

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: