2020-02-15 09:33:04 +00:00
|
|
|
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.send.media
|
|
|
|
|
|
|
|
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
2020-03-22 10:04:11 +00:00
|
|
|
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.InputFile
|
2020-02-15 09:33:04 +00:00
|
|
|
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.media.SendDocument
|
|
|
|
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
|
|
|
|
import com.github.insanusmokrassar.TelegramBotAPI.types.MessageIdentifier
|
|
|
|
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
|
|
|
|
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.KeyboardMarkup
|
|
|
|
import com.github.insanusmokrassar.TelegramBotAPI.types.files.DocumentFile
|
|
|
|
|
|
|
|
suspend fun RequestsExecutor.sendDocument(
|
|
|
|
chatId: ChatIdentifier,
|
2020-02-23 15:29:31 +00:00
|
|
|
document: InputFile,
|
|
|
|
thumb: InputFile? = null,
|
2020-02-15 09:33:04 +00:00
|
|
|
text: String? = null,
|
|
|
|
parseMode: ParseMode? = null,
|
|
|
|
disableNotification: Boolean = false,
|
|
|
|
replyToMessageId: MessageIdentifier? = null,
|
|
|
|
replyMarkup: KeyboardMarkup? = null
|
|
|
|
) = execute(
|
|
|
|
SendDocument(
|
|
|
|
chatId,
|
|
|
|
document,
|
|
|
|
thumb,
|
|
|
|
text,
|
|
|
|
parseMode,
|
|
|
|
disableNotification,
|
|
|
|
replyToMessageId,
|
|
|
|
replyMarkup
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
suspend fun RequestsExecutor.sendDocument(
|
|
|
|
chatId: ChatIdentifier,
|
|
|
|
document: DocumentFile,
|
|
|
|
text: String? = null,
|
|
|
|
parseMode: ParseMode? = null,
|
|
|
|
disableNotification: Boolean = false,
|
|
|
|
replyToMessageId: MessageIdentifier? = null,
|
|
|
|
replyMarkup: KeyboardMarkup? = null
|
|
|
|
) = sendDocument(
|
2020-02-23 15:29:31 +00:00
|
|
|
chatId, document.fileId, document.thumb ?.fileId, text, parseMode, disableNotification, replyToMessageId, replyMarkup
|
2020-02-15 09:33:04 +00:00
|
|
|
)
|