Send Regular Poll
@Serializable
Constructors
Link copied to clipboard
constructor(chatId: ChatIdentifier, question: String, options: List<InputPollOption>, questionParseMode: ParseMode? = null, rawQuestionEntities: List<RawMessageEntity> = emptyList(), isAnonymous: Boolean = true, isClosed: Boolean = false, allowsMultipleAnswers: Boolean = false, allowsRevoting: Boolean = true, shuffleOptions: Boolean = false, allowAddingOptions: Boolean = false, hideResultsUntilCloses: Boolean = false, description: String? = null, descriptionParseMode: ParseMode? = null, rawDescriptionEntities: List<RawMessageEntity>? = null, openPeriod: LongSeconds? = null, closeDate: LongSeconds? = null, media: InputPollMedia? = null, membersOnly: Boolean = false, countryCodes: List<String>? = null, threadId: MessageThreadId? = chatId.threadId, directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, allowPaidBroadcast: Boolean = false, effectId: EffectId? = null, suggestedPostParameters: SuggestedPostParameters? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null)
constructor(chatId: ChatIdentifier, questionTextSources: List<TextSource>, options: List<InputPollOption>, isAnonymous: Boolean = true, isClosed: Boolean = false, allowsMultipleAnswers: Boolean = false, allowsRevoting: Boolean = true, shuffleOptions: Boolean = false, allowAddingOptions: Boolean = false, hideResultsUntilCloses: Boolean = false, description: String? = null, descriptionParseMode: ParseMode? = null, openPeriod: LongSeconds? = null, closeDate: LongSeconds? = null, media: InputPollMedia? = null, membersOnly: Boolean = false, countryCodes: List<String>? = null, threadId: MessageThreadId? = chatId.threadId, directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, allowPaidBroadcast: Boolean = false, effectId: EffectId? = null, suggestedPostParameters: SuggestedPostParameters? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null)
constructor(chatId: ChatIdentifier, question: String, options: List<InputPollOption>, questionParseMode: ParseMode? = null, isAnonymous: Boolean = true, isClosed: Boolean = false, allowsMultipleAnswers: Boolean = false, allowsRevoting: Boolean = true, shuffleOptions: Boolean = false, allowAddingOptions: Boolean = false, hideResultsUntilCloses: Boolean = false, description: String? = null, descriptionParseMode: ParseMode? = null, openPeriod: LongSeconds? = null, closeDate: LongSeconds? = null, media: InputPollMedia? = null, membersOnly: Boolean = false, countryCodes: List<String>? = null, threadId: MessageThreadId? = chatId.threadId, directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, allowPaidBroadcast: Boolean = false, effectId: EffectId? = null, suggestedPostParameters: SuggestedPostParameters? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null)
constructor(chatId: ChatIdentifier, question: String, options: List<InputPollOption>, questionParseMode: ParseMode? = null, isAnonymous: Boolean = true, isClosed: Boolean = false, allowsMultipleAnswers: Boolean = false, allowsRevoting: Boolean = true, shuffleOptions: Boolean = false, allowAddingOptions: Boolean = false, hideResultsUntilCloses: Boolean = false, descriptionTextSources: List<TextSource>? = null, openPeriod: LongSeconds? = null, closeDate: LongSeconds? = null, media: InputPollMedia? = null, membersOnly: Boolean = false, countryCodes: List<String>? = null, threadId: MessageThreadId? = chatId.threadId, directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, allowPaidBroadcast: Boolean = false, effectId: EffectId? = null, suggestedPostParameters: SuggestedPostParameters? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null)
constructor(chatId: ChatIdentifier, questionTextSources: List<TextSource>, options: List<InputPollOption>, isAnonymous: Boolean = true, isClosed: Boolean = false, allowsMultipleAnswers: Boolean = false, allowsRevoting: Boolean = true, shuffleOptions: Boolean = false, allowAddingOptions: Boolean = false, hideResultsUntilCloses: Boolean = false, descriptionTextSources: List<TextSource>? = null, openPeriod: LongSeconds? = null, closeDate: LongSeconds? = null, media: InputPollMedia? = null, membersOnly: Boolean = false, countryCodes: List<String>? = null, threadId: MessageThreadId? = chatId.threadId, directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, disableNotification: Boolean = false, protectContent: Boolean = false, allowPaidBroadcast: Boolean = false, effectId: EffectId? = null, suggestedPostParameters: SuggestedPostParameters? = null, replyParameters: ReplyParameters? = null, replyMarkup: KeyboardMarkup? = null)
Properties
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@SerialName(value = "business_connection_id" )
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@EncodeDefault
@SerialName(value = "direct_messages_topic_id" )
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@SerialName(value = "suggested_post_parameters" )
Link copied to clipboard
Full list of TextSources
Link copied to clipboard
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
fun TextedWithTextSources.parseCommandsWithArgsSources(): Map<BotCommandTextSource, Array<TextSource>>
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: