2020-10-04 10:57:39 +00:00
|
|
|
package dev.inmo.tgbotapi.extensions.api.send
|
2020-02-15 09:33:04 +00:00
|
|
|
|
2020-10-04 11:06:30 +00:00
|
|
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
|
|
|
import dev.inmo.tgbotapi.requests.send.SendTextMessage
|
2022-09-19 07:52:14 +00:00
|
|
|
import dev.inmo.tgbotapi.types.*
|
2022-05-01 14:36:07 +00:00
|
|
|
import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList
|
2022-05-01 14:43:03 +00:00
|
|
|
import dev.inmo.tgbotapi.types.message.ParseMode
|
2020-10-04 11:06:30 +00:00
|
|
|
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
2022-04-21 18:16:41 +00:00
|
|
|
import dev.inmo.tgbotapi.types.chat.Chat
|
2022-09-19 07:52:14 +00:00
|
|
|
import dev.inmo.tgbotapi.types.message.textsources.TextSource
|
|
|
|
import dev.inmo.tgbotapi.utils.EntitiesBuilderBody
|
|
|
|
import dev.inmo.tgbotapi.utils.buildEntities
|
2020-02-15 09:33:04 +00:00
|
|
|
|
2021-10-01 13:38:22 +00:00
|
|
|
/**
|
|
|
|
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
|
|
|
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
|
|
|
*/
|
2020-10-04 07:18:24 +00:00
|
|
|
suspend fun TelegramBot.sendMessage(
|
2020-02-15 09:33:04 +00:00
|
|
|
chatId: ChatIdentifier,
|
|
|
|
text: String,
|
|
|
|
parseMode: ParseMode? = null,
|
2024-01-02 16:22:47 +00:00
|
|
|
linkPreviewOptions: LinkPreviewOptions? = null,
|
2022-11-10 10:24:20 +00:00
|
|
|
threadId: MessageThreadId? = chatId.threadId,
|
2020-02-15 09:33:04 +00:00
|
|
|
disableNotification: Boolean = false,
|
2022-01-01 14:13:22 +00:00
|
|
|
protectContent: Boolean = false,
|
2022-09-14 18:17:18 +00:00
|
|
|
replyToMessageId: MessageId? = null,
|
2020-11-05 17:48:23 +00:00
|
|
|
allowSendingWithoutReply: Boolean? = null,
|
2020-02-15 09:33:04 +00:00
|
|
|
replyMarkup: KeyboardMarkup? = null
|
|
|
|
) = execute(
|
2022-11-07 18:11:14 +00:00
|
|
|
SendTextMessage(
|
|
|
|
chatId,
|
|
|
|
text,
|
|
|
|
parseMode,
|
2024-01-02 16:22:47 +00:00
|
|
|
linkPreviewOptions,
|
2022-11-07 18:11:14 +00:00
|
|
|
threadId,
|
|
|
|
disableNotification,
|
|
|
|
protectContent,
|
|
|
|
replyToMessageId,
|
|
|
|
allowSendingWithoutReply,
|
|
|
|
replyMarkup
|
|
|
|
)
|
2020-02-15 09:33:04 +00:00
|
|
|
)
|
|
|
|
|
2021-10-01 13:38:22 +00:00
|
|
|
/**
|
|
|
|
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
|
|
|
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
|
|
|
*/
|
2020-10-04 07:18:24 +00:00
|
|
|
suspend fun TelegramBot.sendTextMessage(
|
2020-02-15 09:33:04 +00:00
|
|
|
chatId: ChatIdentifier,
|
|
|
|
text: String,
|
|
|
|
parseMode: ParseMode? = null,
|
2024-01-02 16:22:47 +00:00
|
|
|
linkPreviewOptions: LinkPreviewOptions? = null,
|
2022-11-10 10:24:20 +00:00
|
|
|
threadId: MessageThreadId? = chatId.threadId,
|
2020-02-15 09:33:04 +00:00
|
|
|
disableNotification: Boolean = false,
|
2022-01-01 14:13:22 +00:00
|
|
|
protectContent: Boolean = false,
|
2022-09-14 18:17:18 +00:00
|
|
|
replyToMessageId: MessageId? = null,
|
2020-11-05 17:48:23 +00:00
|
|
|
allowSendingWithoutReply: Boolean? = null,
|
2020-02-15 09:33:04 +00:00
|
|
|
replyMarkup: KeyboardMarkup? = null
|
|
|
|
) = sendMessage(
|
2024-01-02 16:22:47 +00:00
|
|
|
chatId, text, parseMode, linkPreviewOptions, threadId, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup
|
2020-02-15 09:33:04 +00:00
|
|
|
)
|
|
|
|
|
2021-10-01 13:38:22 +00:00
|
|
|
/**
|
|
|
|
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
|
|
|
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
|
|
|
*/
|
2022-11-07 18:11:14 +00:00
|
|
|
suspend fun TelegramBot.sendTextMessage(
|
2020-02-15 09:33:04 +00:00
|
|
|
chat: Chat,
|
|
|
|
text: String,
|
|
|
|
parseMode: ParseMode? = null,
|
2024-01-02 16:22:47 +00:00
|
|
|
linkPreviewOptions: LinkPreviewOptions? = null,
|
2022-11-10 10:24:20 +00:00
|
|
|
threadId: MessageThreadId? = chat.id.threadId,
|
2020-02-15 09:33:04 +00:00
|
|
|
disableNotification: Boolean = false,
|
2022-01-01 14:13:22 +00:00
|
|
|
protectContent: Boolean = false,
|
2022-09-14 18:17:18 +00:00
|
|
|
replyToMessageId: MessageId? = null,
|
2020-11-05 17:48:23 +00:00
|
|
|
allowSendingWithoutReply: Boolean? = null,
|
2020-02-15 09:33:04 +00:00
|
|
|
replyMarkup: KeyboardMarkup? = null
|
2024-01-02 16:22:47 +00:00
|
|
|
) = sendTextMessage(chat.id, text, parseMode, linkPreviewOptions, threadId, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
2020-02-15 09:33:04 +00:00
|
|
|
|
|
|
|
|
2021-10-01 13:38:22 +00:00
|
|
|
/**
|
|
|
|
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
|
|
|
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
|
|
|
*/
|
2022-11-07 18:11:14 +00:00
|
|
|
suspend fun TelegramBot.sendMessage(
|
2020-02-15 09:33:04 +00:00
|
|
|
chat: Chat,
|
|
|
|
text: String,
|
|
|
|
parseMode: ParseMode? = null,
|
2024-01-02 16:22:47 +00:00
|
|
|
linkPreviewOptions: LinkPreviewOptions? = null,
|
2022-11-10 10:24:20 +00:00
|
|
|
threadId: MessageThreadId? = chat.id.threadId,
|
2020-02-15 09:33:04 +00:00
|
|
|
disableNotification: Boolean = false,
|
2022-01-01 14:13:22 +00:00
|
|
|
protectContent: Boolean = false,
|
2022-09-14 18:17:18 +00:00
|
|
|
replyToMessageId: MessageId? = null,
|
2020-11-05 17:48:23 +00:00
|
|
|
allowSendingWithoutReply: Boolean? = null,
|
2020-02-15 09:33:04 +00:00
|
|
|
replyMarkup: KeyboardMarkup? = null
|
2024-01-02 16:22:47 +00:00
|
|
|
) = sendMessage(chat.id, text, parseMode, linkPreviewOptions, threadId, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
2020-11-05 17:48:23 +00:00
|
|
|
|
2021-10-01 13:38:22 +00:00
|
|
|
/**
|
|
|
|
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
|
|
|
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
|
|
|
*/
|
2020-11-05 17:48:23 +00:00
|
|
|
suspend fun TelegramBot.sendMessage(
|
|
|
|
chatId: ChatIdentifier,
|
2021-05-29 09:34:14 +00:00
|
|
|
entities: TextSourcesList,
|
2024-01-02 16:22:47 +00:00
|
|
|
linkPreviewOptions: LinkPreviewOptions? = null,
|
2022-11-10 10:24:20 +00:00
|
|
|
threadId: MessageThreadId? = chatId.threadId,
|
2020-11-05 17:48:23 +00:00
|
|
|
disableNotification: Boolean = false,
|
2022-01-01 14:13:22 +00:00
|
|
|
protectContent: Boolean = false,
|
2022-09-14 18:17:18 +00:00
|
|
|
replyToMessageId: MessageId? = null,
|
2020-11-05 17:48:23 +00:00
|
|
|
allowSendingWithoutReply: Boolean? = null,
|
|
|
|
replyMarkup: KeyboardMarkup? = null
|
|
|
|
) = execute(
|
2024-01-02 16:22:47 +00:00
|
|
|
SendTextMessage(chatId, entities, linkPreviewOptions, threadId, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
2020-11-05 17:48:23 +00:00
|
|
|
)
|
|
|
|
|
2022-09-19 07:52:14 +00:00
|
|
|
/**
|
|
|
|
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
|
|
|
* as a builder for that
|
|
|
|
*/
|
|
|
|
suspend fun TelegramBot.sendMessage(
|
|
|
|
chatId: ChatIdentifier,
|
|
|
|
separator: TextSource? = null,
|
2024-01-02 16:22:47 +00:00
|
|
|
linkPreviewOptions: LinkPreviewOptions? = null,
|
2022-11-10 10:24:20 +00:00
|
|
|
threadId: MessageThreadId? = chatId.threadId,
|
2022-09-19 07:52:14 +00:00
|
|
|
disableNotification: Boolean = false,
|
|
|
|
protectContent: Boolean = false,
|
|
|
|
replyToMessageId: MessageId? = null,
|
|
|
|
allowSendingWithoutReply: Boolean? = null,
|
|
|
|
replyMarkup: KeyboardMarkup? = null,
|
|
|
|
builderBody: EntitiesBuilderBody
|
2024-01-02 16:22:47 +00:00
|
|
|
) = sendMessage(chatId, buildEntities(separator, builderBody), linkPreviewOptions, threadId, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
2022-09-19 07:52:14 +00:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
|
|
|
* as a builder for that
|
|
|
|
*/
|
|
|
|
suspend fun TelegramBot.sendMessage(
|
|
|
|
chatId: ChatIdentifier,
|
|
|
|
separator: String,
|
2024-01-02 16:22:47 +00:00
|
|
|
linkPreviewOptions: LinkPreviewOptions? = null,
|
2022-11-10 10:24:20 +00:00
|
|
|
threadId: MessageThreadId? = chatId.threadId,
|
2022-09-19 07:52:14 +00:00
|
|
|
disableNotification: Boolean = false,
|
|
|
|
protectContent: Boolean = false,
|
|
|
|
replyToMessageId: MessageId? = null,
|
|
|
|
allowSendingWithoutReply: Boolean? = null,
|
|
|
|
replyMarkup: KeyboardMarkup? = null,
|
|
|
|
builderBody: EntitiesBuilderBody
|
2024-01-02 16:22:47 +00:00
|
|
|
) = sendMessage(chatId, buildEntities(separator, builderBody), linkPreviewOptions, threadId, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
2022-09-19 07:52:14 +00:00
|
|
|
|
2021-10-01 13:38:22 +00:00
|
|
|
/**
|
|
|
|
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
|
|
|
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
|
|
|
*/
|
2020-11-05 17:48:23 +00:00
|
|
|
suspend fun TelegramBot.sendTextMessage(
|
|
|
|
chatId: ChatIdentifier,
|
2021-05-29 09:34:14 +00:00
|
|
|
entities: TextSourcesList,
|
2024-01-02 16:22:47 +00:00
|
|
|
linkPreviewOptions: LinkPreviewOptions? = null,
|
2022-11-10 10:24:20 +00:00
|
|
|
threadId: MessageThreadId? = chatId.threadId,
|
2020-11-05 17:48:23 +00:00
|
|
|
disableNotification: Boolean = false,
|
2022-01-01 14:13:22 +00:00
|
|
|
protectContent: Boolean = false,
|
2022-09-14 18:17:18 +00:00
|
|
|
replyToMessageId: MessageId? = null,
|
2020-11-05 17:48:23 +00:00
|
|
|
allowSendingWithoutReply: Boolean? = null,
|
|
|
|
replyMarkup: KeyboardMarkup? = null
|
|
|
|
) = sendMessage(
|
2024-01-02 16:22:47 +00:00
|
|
|
chatId, entities, linkPreviewOptions, threadId, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup
|
2020-11-05 17:48:23 +00:00
|
|
|
)
|
|
|
|
|
2022-09-19 07:52:14 +00:00
|
|
|
/**
|
|
|
|
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
|
|
|
* as a builder for that
|
|
|
|
*/
|
|
|
|
suspend fun TelegramBot.sendTextMessage(
|
|
|
|
chatId: ChatIdentifier,
|
|
|
|
separator: TextSource? = null,
|
2024-01-02 16:22:47 +00:00
|
|
|
linkPreviewOptions: LinkPreviewOptions? = null,
|
2022-11-10 10:24:20 +00:00
|
|
|
threadId: MessageThreadId? = chatId.threadId,
|
2022-09-19 07:52:14 +00:00
|
|
|
disableNotification: Boolean = false,
|
|
|
|
protectContent: Boolean = false,
|
|
|
|
replyToMessageId: MessageId? = null,
|
|
|
|
allowSendingWithoutReply: Boolean? = null,
|
|
|
|
replyMarkup: KeyboardMarkup? = null,
|
|
|
|
builderBody: EntitiesBuilderBody
|
2024-01-02 16:22:47 +00:00
|
|
|
) = sendTextMessage(chatId, buildEntities(separator, builderBody), linkPreviewOptions, threadId, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
2022-09-19 07:52:14 +00:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
|
|
|
* as a builder for that
|
|
|
|
*/
|
|
|
|
suspend fun TelegramBot.sendTextMessage(
|
|
|
|
chatId: ChatIdentifier,
|
|
|
|
separator: String,
|
2024-01-02 16:22:47 +00:00
|
|
|
linkPreviewOptions: LinkPreviewOptions? = null,
|
2022-11-10 10:24:20 +00:00
|
|
|
threadId: MessageThreadId? = chatId.threadId,
|
2022-09-19 07:52:14 +00:00
|
|
|
disableNotification: Boolean = false,
|
|
|
|
protectContent: Boolean = false,
|
|
|
|
replyToMessageId: MessageId? = null,
|
|
|
|
allowSendingWithoutReply: Boolean? = null,
|
|
|
|
replyMarkup: KeyboardMarkup? = null,
|
|
|
|
builderBody: EntitiesBuilderBody
|
2024-01-02 16:22:47 +00:00
|
|
|
) = sendTextMessage(chatId, buildEntities(separator, builderBody), linkPreviewOptions, threadId, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
2022-09-19 07:52:14 +00:00
|
|
|
|
2021-10-01 13:38:22 +00:00
|
|
|
/**
|
|
|
|
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
|
|
|
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
|
|
|
*/
|
2020-11-05 17:48:23 +00:00
|
|
|
suspend fun TelegramBot.sendMessage(
|
|
|
|
chat: Chat,
|
2021-05-29 09:34:14 +00:00
|
|
|
entities: TextSourcesList,
|
2024-01-02 16:22:47 +00:00
|
|
|
linkPreviewOptions: LinkPreviewOptions? = null,
|
2022-11-10 10:24:20 +00:00
|
|
|
threadId: MessageThreadId? = chat.id.threadId,
|
2020-11-05 17:48:23 +00:00
|
|
|
disableNotification: Boolean = false,
|
2022-01-01 14:13:22 +00:00
|
|
|
protectContent: Boolean = false,
|
2022-09-14 18:17:18 +00:00
|
|
|
replyToMessageId: MessageId? = null,
|
2020-11-05 17:48:23 +00:00
|
|
|
allowSendingWithoutReply: Boolean? = null,
|
|
|
|
replyMarkup: KeyboardMarkup? = null
|
2024-01-02 16:22:47 +00:00
|
|
|
) = sendMessage(chat.id, entities, linkPreviewOptions, threadId, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
2020-11-05 17:48:23 +00:00
|
|
|
|
2022-09-19 07:52:14 +00:00
|
|
|
/**
|
|
|
|
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
|
|
|
* as a builder for that
|
|
|
|
*/
|
|
|
|
suspend fun TelegramBot.sendMessage(
|
|
|
|
chat: Chat,
|
|
|
|
separator: TextSource? = null,
|
2024-01-02 16:22:47 +00:00
|
|
|
linkPreviewOptions: LinkPreviewOptions? = null,
|
2022-11-10 10:24:20 +00:00
|
|
|
threadId: MessageThreadId? = chat.id.threadId,
|
2022-09-19 07:52:14 +00:00
|
|
|
disableNotification: Boolean = false,
|
|
|
|
protectContent: Boolean = false,
|
|
|
|
replyToMessageId: MessageId? = null,
|
|
|
|
allowSendingWithoutReply: Boolean? = null,
|
|
|
|
replyMarkup: KeyboardMarkup? = null,
|
|
|
|
builderBody: EntitiesBuilderBody
|
2024-01-02 16:22:47 +00:00
|
|
|
) = sendMessage(chat, buildEntities(separator, builderBody), linkPreviewOptions, threadId, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
2022-09-19 07:52:14 +00:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
|
|
|
* as a builder for that
|
|
|
|
*/
|
|
|
|
suspend fun TelegramBot.sendMessage(
|
|
|
|
chat: Chat,
|
|
|
|
separator: String,
|
2024-01-02 16:22:47 +00:00
|
|
|
linkPreviewOptions: LinkPreviewOptions? = null,
|
2022-11-10 10:24:20 +00:00
|
|
|
threadId: MessageThreadId? = chat.id.threadId,
|
2022-09-19 07:52:14 +00:00
|
|
|
disableNotification: Boolean = false,
|
|
|
|
protectContent: Boolean = false,
|
|
|
|
replyToMessageId: MessageId? = null,
|
|
|
|
allowSendingWithoutReply: Boolean? = null,
|
|
|
|
replyMarkup: KeyboardMarkup? = null,
|
|
|
|
builderBody: EntitiesBuilderBody
|
2024-01-02 16:22:47 +00:00
|
|
|
) = sendMessage(chat, buildEntities(separator, builderBody), linkPreviewOptions, threadId, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
2022-09-19 07:52:14 +00:00
|
|
|
|
2020-11-05 17:48:23 +00:00
|
|
|
|
2021-10-01 13:38:22 +00:00
|
|
|
/**
|
|
|
|
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
|
|
|
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
|
|
|
*/
|
2020-11-05 17:48:23 +00:00
|
|
|
suspend fun TelegramBot.sendTextMessage(
|
|
|
|
chat: Chat,
|
2021-05-29 09:34:14 +00:00
|
|
|
entities: TextSourcesList,
|
2024-01-02 16:22:47 +00:00
|
|
|
linkPreviewOptions: LinkPreviewOptions? = null,
|
2022-11-10 10:24:20 +00:00
|
|
|
threadId: MessageThreadId? = chat.id.threadId,
|
2020-11-05 17:48:23 +00:00
|
|
|
disableNotification: Boolean = false,
|
2022-01-01 14:13:22 +00:00
|
|
|
protectContent: Boolean = false,
|
2022-09-14 18:17:18 +00:00
|
|
|
replyToMessageId: MessageId? = null,
|
2020-11-05 17:48:23 +00:00
|
|
|
allowSendingWithoutReply: Boolean? = null,
|
|
|
|
replyMarkup: KeyboardMarkup? = null
|
2024-01-02 16:22:47 +00:00
|
|
|
) = sendTextMessage(chat.id, entities, linkPreviewOptions, threadId, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
2022-09-19 07:52:14 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
|
|
|
* as a builder for that
|
|
|
|
*/
|
|
|
|
suspend fun TelegramBot.sendTextMessage(
|
|
|
|
chat: Chat,
|
|
|
|
separator: TextSource? = null,
|
2024-01-02 16:22:47 +00:00
|
|
|
linkPreviewOptions: LinkPreviewOptions? = null,
|
2022-11-10 10:24:20 +00:00
|
|
|
threadId: MessageThreadId? = chat.id.threadId,
|
2022-09-19 07:52:14 +00:00
|
|
|
disableNotification: Boolean = false,
|
|
|
|
protectContent: Boolean = false,
|
|
|
|
replyToMessageId: MessageId? = null,
|
|
|
|
allowSendingWithoutReply: Boolean? = null,
|
|
|
|
replyMarkup: KeyboardMarkup? = null,
|
|
|
|
builderBody: EntitiesBuilderBody
|
2024-01-02 16:22:47 +00:00
|
|
|
) = sendTextMessage(chat, buildEntities(separator, builderBody), linkPreviewOptions, threadId, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
2022-09-19 07:52:14 +00:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
|
|
|
* as a builder for that
|
|
|
|
*/
|
|
|
|
suspend fun TelegramBot.sendTextMessage(
|
|
|
|
chat: Chat,
|
|
|
|
separator: String,
|
2024-01-02 16:22:47 +00:00
|
|
|
linkPreviewOptions: LinkPreviewOptions? = null,
|
2022-11-10 10:24:20 +00:00
|
|
|
threadId: MessageThreadId? = chat.id.threadId,
|
2022-09-19 07:52:14 +00:00
|
|
|
disableNotification: Boolean = false,
|
|
|
|
protectContent: Boolean = false,
|
|
|
|
replyToMessageId: MessageId? = null,
|
|
|
|
allowSendingWithoutReply: Boolean? = null,
|
|
|
|
replyMarkup: KeyboardMarkup? = null,
|
|
|
|
builderBody: EntitiesBuilderBody
|
2024-01-02 16:22:47 +00:00
|
|
|
) = sendTextMessage(chat, buildEntities(separator, builderBody), linkPreviewOptions, threadId, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|