mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-06-29 04:47:48 +00:00
168 lines
4.9 KiB
Kotlin
168 lines
4.9 KiB
Kotlin
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.send.media
|
|
|
|
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
|
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.FileId
|
|
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.MultipartFile
|
|
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.media.SendAnimation
|
|
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.AnimationFile
|
|
import com.github.insanusmokrassar.TelegramBotAPI.types.files.PhotoSize
|
|
|
|
suspend fun RequestsExecutor.sendAnimation(
|
|
chatId: ChatIdentifier,
|
|
animation: FileId,
|
|
thumb: FileId? = null,
|
|
text: String? = null,
|
|
parseMode: ParseMode? = null,
|
|
duration: Long? = null,
|
|
width: Int? = null,
|
|
height: Int? = null,
|
|
disableNotification: Boolean = false,
|
|
replyToMessageId: MessageIdentifier? = null,
|
|
replyMarkup: KeyboardMarkup? = null
|
|
) = execute(
|
|
SendAnimation(
|
|
chatId,
|
|
animation,
|
|
thumb,
|
|
text,
|
|
parseMode,
|
|
duration,
|
|
width,
|
|
height,
|
|
disableNotification,
|
|
replyToMessageId,
|
|
replyMarkup
|
|
)
|
|
)
|
|
|
|
suspend fun RequestsExecutor.sendAnimation(
|
|
chatId: ChatIdentifier,
|
|
animation: AnimationFile,
|
|
thumb: PhotoSize? = animation.thumb,
|
|
text: String? = null,
|
|
parseMode: ParseMode? = null,
|
|
disableNotification: Boolean = false,
|
|
replyToMessageId: MessageIdentifier? = null,
|
|
replyMarkup: KeyboardMarkup? = null
|
|
) = sendAnimation(
|
|
chatId, animation.fileId, thumb ?.fileId, text, parseMode, animation.duration, animation.width, animation.height, disableNotification, replyToMessageId, replyMarkup
|
|
)
|
|
|
|
suspend fun RequestsExecutor.sendAnimation(
|
|
chatId: ChatIdentifier,
|
|
animation: MultipartFile,
|
|
thumb: FileId? = null,
|
|
text: String? = null,
|
|
parseMode: ParseMode? = null,
|
|
duration: Long? = null,
|
|
width: Int? = null,
|
|
height: Int? = null,
|
|
disableNotification: Boolean = false,
|
|
replyToMessageId: MessageIdentifier? = null,
|
|
replyMarkup: KeyboardMarkup? = null
|
|
) = execute(
|
|
SendAnimation(
|
|
chatId,
|
|
animation,
|
|
thumb,
|
|
text,
|
|
parseMode,
|
|
duration,
|
|
width,
|
|
height,
|
|
disableNotification,
|
|
replyToMessageId,
|
|
replyMarkup
|
|
)
|
|
)
|
|
|
|
suspend fun RequestsExecutor.sendAnimation(
|
|
chatId: ChatIdentifier,
|
|
animation: MultipartFile,
|
|
thumb: MultipartFile? = null,
|
|
text: String? = null,
|
|
parseMode: ParseMode? = null,
|
|
duration: Long? = null,
|
|
width: Int? = null,
|
|
height: Int? = null,
|
|
disableNotification: Boolean = false,
|
|
replyToMessageId: MessageIdentifier? = null,
|
|
replyMarkup: KeyboardMarkup? = null
|
|
) = execute(
|
|
SendAnimation(
|
|
chatId,
|
|
animation,
|
|
thumb,
|
|
text,
|
|
parseMode,
|
|
duration,
|
|
width,
|
|
height,
|
|
disableNotification,
|
|
replyToMessageId,
|
|
replyMarkup
|
|
)
|
|
)
|
|
|
|
suspend fun RequestsExecutor.sendAnimation(
|
|
chatId: ChatIdentifier,
|
|
animation: FileId,
|
|
thumb: MultipartFile,
|
|
text: String? = null,
|
|
parseMode: ParseMode? = null,
|
|
duration: Long? = null,
|
|
width: Int? = null,
|
|
height: Int? = null,
|
|
disableNotification: Boolean = false,
|
|
replyToMessageId: MessageIdentifier? = null,
|
|
replyMarkup: KeyboardMarkup? = null
|
|
) = execute(
|
|
SendAnimation(
|
|
chatId,
|
|
animation,
|
|
thumb,
|
|
text,
|
|
parseMode,
|
|
duration,
|
|
width,
|
|
height,
|
|
disableNotification,
|
|
replyToMessageId,
|
|
replyMarkup
|
|
)
|
|
)
|
|
|
|
suspend fun RequestsExecutor.sendAnimation(
|
|
chatId: ChatIdentifier,
|
|
animation: MultipartFile,
|
|
thumb: PhotoSize? = null,
|
|
text: String? = null,
|
|
parseMode: ParseMode? = null,
|
|
duration: Long? = null,
|
|
width: Int? = null,
|
|
height: Int? = null,
|
|
disableNotification: Boolean = false,
|
|
replyToMessageId: MessageIdentifier? = null,
|
|
replyMarkup: KeyboardMarkup? = null
|
|
) = sendAnimation(
|
|
chatId, animation, thumb ?.fileId , text, parseMode, duration, width, height, disableNotification, replyToMessageId, replyMarkup
|
|
)
|
|
|
|
suspend fun RequestsExecutor.sendAnimation(
|
|
chatId: ChatIdentifier,
|
|
animation: AnimationFile,
|
|
thumb: MultipartFile,
|
|
text: String? = null,
|
|
parseMode: ParseMode? = null,
|
|
disableNotification: Boolean = false,
|
|
replyToMessageId: MessageIdentifier? = null,
|
|
replyMarkup: KeyboardMarkup? = null
|
|
) = sendAnimation(
|
|
chatId, animation.fileId, thumb, text, parseMode, animation.duration, animation.width, animation.height, disableNotification, replyToMessageId, replyMarkup
|
|
)
|
|
|