75 lines
3.3 KiB
Kotlin
75 lines
3.3 KiB
Kotlin
package dev.inmo.tgbotapi.extensions.api.send.media
|
|
|
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
|
import dev.inmo.tgbotapi.requests.abstracts.InputFile
|
|
import dev.inmo.tgbotapi.requests.send.media.SendSticker
|
|
import dev.inmo.tgbotapi.types.ChatIdentifier
|
|
import dev.inmo.tgbotapi.types.MessageId
|
|
import dev.inmo.tgbotapi.types.MessageThreadId
|
|
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
|
import dev.inmo.tgbotapi.types.chat.Chat
|
|
import dev.inmo.tgbotapi.types.files.Sticker
|
|
import dev.inmo.tgbotapi.types.threadId
|
|
|
|
/**
|
|
* @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
|
|
*/
|
|
suspend fun TelegramBot.sendSticker(
|
|
chatId: ChatIdentifier,
|
|
sticker: InputFile,
|
|
threadId: MessageThreadId? = chatId.threadId,
|
|
disableNotification: Boolean = false,
|
|
protectContent: Boolean = false,
|
|
replyToMessageId: MessageId? = null,
|
|
allowSendingWithoutReply: Boolean? = null,
|
|
replyMarkup: KeyboardMarkup? = null
|
|
) = execute(
|
|
SendSticker(chatId, sticker, threadId, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
|
)
|
|
|
|
/**
|
|
* @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
|
|
*/
|
|
suspend fun TelegramBot.sendSticker(
|
|
chat: Chat,
|
|
sticker: InputFile,
|
|
threadId: MessageThreadId? = chat.id.threadId,
|
|
disableNotification: Boolean = false,
|
|
protectContent: Boolean = false,
|
|
replyToMessageId: MessageId? = null,
|
|
allowSendingWithoutReply: Boolean? = null,
|
|
replyMarkup: KeyboardMarkup? = null
|
|
) = sendSticker(chat.id, sticker, threadId, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
|
|
|
/**
|
|
* @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
|
|
*/
|
|
suspend fun TelegramBot.sendSticker(
|
|
chatId: ChatIdentifier,
|
|
sticker: Sticker,
|
|
threadId: MessageThreadId? = chatId.threadId,
|
|
disableNotification: Boolean = false,
|
|
protectContent: Boolean = false,
|
|
replyToMessageId: MessageId? = null,
|
|
allowSendingWithoutReply: Boolean? = null,
|
|
replyMarkup: KeyboardMarkup? = null
|
|
) = sendSticker(chatId, sticker.fileId, threadId, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
|
|
|
/**
|
|
* @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
|
|
*/
|
|
suspend fun TelegramBot.sendSticker(
|
|
chat: Chat,
|
|
sticker: Sticker,
|
|
threadId: MessageThreadId? = chat.id.threadId,
|
|
disableNotification: Boolean = false,
|
|
protectContent: Boolean = false,
|
|
replyToMessageId: MessageId? = null,
|
|
allowSendingWithoutReply: Boolean? = null,
|
|
replyMarkup: KeyboardMarkup? = null
|
|
) = sendSticker(chat, sticker.fileId, threadId, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|