1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2025-10-22 07:40:08 +00:00

a lot of types has been converted to sealed

This commit is contained in:
2021-05-29 14:23:25 +06:00
parent 12184cd2be
commit 7825ec3010
116 changed files with 531 additions and 468 deletions

View File

@@ -4,6 +4,7 @@ import dev.inmo.tgbotapi.CommonAbstracts.*
import dev.inmo.tgbotapi.bot.TelegramBot
import dev.inmo.tgbotapi.requests.edit.caption.EditChatMessageCaption
import dev.inmo.tgbotapi.types.ChatIdentifier
import dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSource
import dev.inmo.tgbotapi.types.MessageIdentifier
import dev.inmo.tgbotapi.types.ParseMode.ParseMode
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
@@ -41,7 +42,7 @@ suspend fun <T> TelegramBot.editMessageCaption(
suspend fun TelegramBot.editMessageCaption(
chatId: ChatIdentifier,
messageId: MessageIdentifier,
entities: List<TextSource>,
entities: List<dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSource>,
replyMarkup: InlineKeyboardMarkup? = null
) = execute(
EditChatMessageCaption(chatId, messageId, entities, replyMarkup)
@@ -50,7 +51,7 @@ suspend fun TelegramBot.editMessageCaption(
suspend fun TelegramBot.editMessageCaption(
chat: Chat,
messageId: MessageIdentifier,
entities: List<TextSource>,
entities: List<dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSource>,
replyMarkup: InlineKeyboardMarkup? = null
) = editMessageCaption(chat.id, messageId, entities, replyMarkup)

View File

@@ -1,6 +1,5 @@
package dev.inmo.tgbotapi.extensions.api.edit.caption
import dev.inmo.tgbotapi.CommonAbstracts.TextSource
import dev.inmo.tgbotapi.bot.TelegramBot
import dev.inmo.tgbotapi.requests.edit.caption.EditInlineMessageCaption
import dev.inmo.tgbotapi.types.InlineMessageIdentifier
@@ -16,6 +15,6 @@ suspend fun TelegramBot.editMessageCaption(
suspend fun TelegramBot.editMessageCaption(
inlineMessageId: InlineMessageIdentifier,
entities: List<TextSource>,
entities: List<dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSource>,
replyMarkup: InlineKeyboardMarkup? = null
) = execute(EditInlineMessageCaption(inlineMessageId, entities, replyMarkup))

View File

@@ -1,6 +1,5 @@
package dev.inmo.tgbotapi.extensions.api.edit.text
import dev.inmo.tgbotapi.CommonAbstracts.TextSource
import dev.inmo.tgbotapi.bot.TelegramBot
import dev.inmo.tgbotapi.requests.edit.text.EditChatMessageText
import dev.inmo.tgbotapi.types.ChatIdentifier
@@ -42,7 +41,7 @@ suspend fun TelegramBot.editMessageText(
suspend fun TelegramBot.editMessageText(
chatId: ChatIdentifier,
messageId: MessageIdentifier,
entities: List<TextSource>,
entities: List<dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSource>,
disableWebPagePreview: Boolean? = null,
replyMarkup: InlineKeyboardMarkup? = null
) = execute(
@@ -52,14 +51,14 @@ suspend fun TelegramBot.editMessageText(
suspend fun TelegramBot.editMessageText(
chat: Chat,
messageId: MessageIdentifier,
entities: List<TextSource>,
entities: List<dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSource>,
disableWebPagePreview: Boolean? = null,
replyMarkup: InlineKeyboardMarkup? = null
) = editMessageText(chat.id, messageId, entities, disableWebPagePreview, replyMarkup)
suspend fun TelegramBot.editMessageText(
message: ContentMessage<TextContent>,
entities: List<TextSource>,
entities: List<dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSource>,
disableWebPagePreview: Boolean? = null,
replyMarkup: InlineKeyboardMarkup? = null
) = editMessageText(message.chat.id, message.messageId, entities, disableWebPagePreview, replyMarkup)
) = editMessageText(message.chat.id, message.messageId, entities, disableWebPagePreview, replyMarkup)

View File

@@ -1,6 +1,5 @@
package dev.inmo.tgbotapi.extensions.api.edit.text
import dev.inmo.tgbotapi.CommonAbstracts.TextSource
import dev.inmo.tgbotapi.bot.TelegramBot
import dev.inmo.tgbotapi.requests.edit.text.EditInlineMessageText
import dev.inmo.tgbotapi.types.InlineMessageIdentifier
@@ -17,7 +16,7 @@ suspend fun TelegramBot.editMessageText(
suspend fun TelegramBot.editMessageText(
inlineMessageId: InlineMessageIdentifier,
entities: List<TextSource>,
entities: List<dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSource>,
disableWebPagePreview: Boolean? = null,
replyMarkup: InlineKeyboardMarkup? = null
) = execute(EditInlineMessageText(inlineMessageId, entities, disableWebPagePreview, replyMarkup))

View File

@@ -1,6 +1,5 @@
package dev.inmo.tgbotapi.extensions.api.send
import dev.inmo.tgbotapi.CommonAbstracts.TextSource
import dev.inmo.tgbotapi.bot.TelegramBot
import dev.inmo.tgbotapi.requests.send.CopyMessage
import dev.inmo.tgbotapi.types.ChatIdentifier
@@ -87,7 +86,7 @@ suspend inline fun TelegramBot.copyMessage(
fromChatId: ChatIdentifier,
toChatId: ChatIdentifier,
messageId: MessageIdentifier,
entities: List<TextSource>,
entities: List<dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSource>,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
allowSendingWithoutReply: Boolean? = null,
@@ -100,7 +99,7 @@ suspend inline fun TelegramBot.copyMessage(
fromChat: Chat,
toChatId: ChatIdentifier,
messageId: MessageIdentifier,
entities: List<TextSource>,
entities: List<dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSource>,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
allowSendingWithoutReply: Boolean? = null,
@@ -111,7 +110,7 @@ suspend inline fun TelegramBot.copyMessage(
fromChatId: ChatIdentifier,
toChat: Chat,
messageId: MessageIdentifier,
entities: List<TextSource>,
entities: List<dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSource>,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
allowSendingWithoutReply: Boolean? = null,
@@ -122,7 +121,7 @@ suspend inline fun TelegramBot.copyMessage(
fromChat: Chat,
toChat: Chat,
messageId: MessageIdentifier,
entities: List<TextSource>,
entities: List<dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSource>,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
allowSendingWithoutReply: Boolean? = null,
@@ -132,7 +131,7 @@ suspend inline fun TelegramBot.copyMessage(
suspend inline fun TelegramBot.copyMessage(
toChatId: ChatIdentifier,
message: Message,
entities: List<TextSource>,
entities: List<dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSource>,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
allowSendingWithoutReply: Boolean? = null,
@@ -142,7 +141,7 @@ suspend inline fun TelegramBot.copyMessage(
suspend inline fun TelegramBot.copyMessage(
toChat: Chat,
message: Message,
entities: List<TextSource>,
entities: List<dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSource>,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
allowSendingWithoutReply: Boolean? = null,

View File

@@ -1,6 +1,5 @@
package dev.inmo.tgbotapi.extensions.api.send
import dev.inmo.tgbotapi.CommonAbstracts.TextSource
import dev.inmo.tgbotapi.bot.TelegramBot
import dev.inmo.tgbotapi.requests.send.SendTextMessage
import dev.inmo.tgbotapi.types.ChatIdentifier
@@ -61,7 +60,7 @@ suspend fun TelegramBot.sendTextMessage(
suspend fun TelegramBot.sendMessage(
chatId: ChatIdentifier,
entities: List<TextSource>,
entities: List<dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSource>,
disableWebPagePreview: Boolean? = null,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
@@ -73,7 +72,7 @@ suspend fun TelegramBot.sendMessage(
suspend fun TelegramBot.sendTextMessage(
chatId: ChatIdentifier,
entities: List<TextSource>,
entities: List<dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSource>,
disableWebPagePreview: Boolean? = null,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
@@ -85,7 +84,7 @@ suspend fun TelegramBot.sendTextMessage(
suspend fun TelegramBot.sendMessage(
chat: Chat,
entities: List<TextSource>,
entities: List<dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSource>,
disableWebPagePreview: Boolean? = null,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
@@ -96,7 +95,7 @@ suspend fun TelegramBot.sendMessage(
suspend fun TelegramBot.sendTextMessage(
chat: Chat,
entities: List<TextSource>,
entities: List<dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSource>,
disableWebPagePreview: Boolean? = null,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
@@ -124,7 +123,7 @@ suspend inline fun TelegramBot.reply(
)
suspend inline fun TelegramBot.reply(
to: Message,
entities: List<TextSource>,
entities: List<dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSource>,
disableWebPagePreview: Boolean? = null,
disableNotification: Boolean = false,
allowSendingWithoutReply: Boolean? = null,

View File

@@ -1,6 +1,5 @@
package dev.inmo.tgbotapi.extensions.api.send.media
import dev.inmo.tgbotapi.CommonAbstracts.TextSource
import dev.inmo.tgbotapi.bot.TelegramBot
import dev.inmo.tgbotapi.requests.abstracts.InputFile
import dev.inmo.tgbotapi.requests.send.media.SendAnimation
@@ -145,7 +144,7 @@ suspend fun TelegramBot.sendAnimation(
chatId: ChatIdentifier,
animation: InputFile,
thumb: InputFile? = null,
entities: List<TextSource>,
entities: List<dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSource>,
duration: Long? = null,
width: Int? = null,
height: Int? = null,
@@ -172,7 +171,7 @@ suspend fun TelegramBot.sendAnimation(
suspend fun TelegramBot.sendAnimation(
chatId: ChatIdentifier,
animation: AnimationFile,
entities: List<TextSource>,
entities: List<dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSource>,
duration: Long? = null,
width: Int? = null,
height: Int? = null,
@@ -188,7 +187,7 @@ suspend fun TelegramBot.sendAnimation(
chat: Chat,
animation: InputFile,
thumb: InputFile? = null,
entities: List<TextSource>,
entities: List<dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSource>,
duration: Long? = null,
width: Int? = null,
height: Int? = null,
@@ -201,7 +200,7 @@ suspend fun TelegramBot.sendAnimation(
suspend fun TelegramBot.sendAnimation(
chat: Chat,
animation: AnimationFile,
entities: List<TextSource>,
entities: List<dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSource>,
duration: Long? = null,
width: Int? = null,
height: Int? = null,
@@ -215,7 +214,7 @@ suspend inline fun TelegramBot.replyWithAnimation(
to: Message,
animation: InputFile,
thumb: InputFile? = null,
entities: List<TextSource>,
entities: List<dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSource>,
duration: Long? = null,
width: Int? = null,
height: Int? = null,
@@ -239,7 +238,7 @@ suspend inline fun TelegramBot.replyWithAnimation(
suspend inline fun TelegramBot.replyWithAnimation(
to: Message,
animation: AnimationFile,
entities: List<TextSource>,
entities: List<dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSource>,
duration: Long? = null,
width: Int? = null,
height: Int? = null,
@@ -251,7 +250,7 @@ suspend inline fun TelegramBot.replyWithAnimation(
suspend inline fun TelegramBot.reply(
to: Message,
animation: AnimationFile,
entities: List<TextSource>,
entities: List<dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSource>,
duration: Long? = null,
width: Int? = null,
height: Int? = null,

View File

@@ -1,6 +1,5 @@
package dev.inmo.tgbotapi.extensions.api.send.media
import dev.inmo.tgbotapi.CommonAbstracts.TextSource
import dev.inmo.tgbotapi.bot.TelegramBot
import dev.inmo.tgbotapi.requests.abstracts.InputFile
import dev.inmo.tgbotapi.requests.send.media.SendAudio
@@ -122,7 +121,7 @@ suspend inline fun TelegramBot.sendAudio(
chatId: ChatIdentifier,
audio: InputFile,
thumb: InputFile? = null,
entities: List<TextSource>,
entities: List<dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSource>,
duration: Long? = null,
performer: String? = null,
title: String? = null,
@@ -150,7 +149,7 @@ suspend inline fun TelegramBot.sendAudio(
chat: Chat,
audio: InputFile,
thumb: InputFile? = null,
entities: List<TextSource>,
entities: List<dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSource>,
duration: Long? = null,
performer: String? = null,
title: String? = null,
@@ -163,7 +162,7 @@ suspend inline fun TelegramBot.sendAudio(
suspend inline fun TelegramBot.sendAudio(
chatId: ChatIdentifier,
audio: AudioFile,
entities: List<TextSource>,
entities: List<dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSource>,
title: String? = audio.title,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
@@ -174,7 +173,7 @@ suspend inline fun TelegramBot.sendAudio(
suspend inline fun TelegramBot.sendAudio(
chat: Chat,
audio: AudioFile,
entities: List<TextSource>,
entities: List<dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSource>,
title: String? = audio.title,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
@@ -186,7 +185,7 @@ suspend inline fun TelegramBot.replyWithAudio(
to: Message,
audio: InputFile,
thumb: InputFile? = null,
entities: List<TextSource>,
entities: List<dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSource>,
duration: Long? = null,
performer: String? = null,
title: String? = null,
@@ -198,7 +197,7 @@ suspend inline fun TelegramBot.replyWithAudio(
suspend inline fun TelegramBot.replyWithAudio(
to: Message,
audio: AudioFile,
entities: List<TextSource>,
entities: List<dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSource>,
title: String? = null,
disableNotification: Boolean = false,
allowSendingWithoutReply: Boolean? = null,
@@ -208,7 +207,7 @@ suspend inline fun TelegramBot.replyWithAudio(
suspend inline fun TelegramBot.reply(
to: Message,
audio: AudioFile,
entities: List<TextSource>,
entities: List<dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSource>,
title: String? = null,
disableNotification: Boolean = false,
allowSendingWithoutReply: Boolean? = null,

View File

@@ -1,6 +1,5 @@
package dev.inmo.tgbotapi.extensions.api.send.media
import dev.inmo.tgbotapi.CommonAbstracts.TextSource
import dev.inmo.tgbotapi.bot.TelegramBot
import dev.inmo.tgbotapi.requests.abstracts.InputFile
import dev.inmo.tgbotapi.requests.send.media.SendDocument
@@ -116,7 +115,7 @@ suspend inline fun TelegramBot.sendDocument(
chatId: ChatIdentifier,
document: InputFile,
thumb: InputFile? = null,
entities: List<TextSource>,
entities: List<dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSource>,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
allowSendingWithoutReply: Boolean? = null,
@@ -140,7 +139,7 @@ suspend inline fun TelegramBot.sendDocument(
chat: Chat,
document: InputFile,
thumb: InputFile? = null,
entities: List<TextSource>,
entities: List<dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSource>,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
allowSendingWithoutReply: Boolean? = null,
@@ -151,7 +150,7 @@ suspend inline fun TelegramBot.sendDocument(
suspend inline fun TelegramBot.sendDocument(
chatId: ChatIdentifier,
document: DocumentFile,
entities: List<TextSource>,
entities: List<dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSource>,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
allowSendingWithoutReply: Boolean? = null,
@@ -164,7 +163,7 @@ suspend inline fun TelegramBot.sendDocument(
suspend inline fun TelegramBot.sendDocument(
chat: Chat,
document: DocumentFile,
entities: List<TextSource>,
entities: List<dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSource>,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
allowSendingWithoutReply: Boolean? = null,
@@ -176,7 +175,7 @@ suspend inline fun TelegramBot.replyWithDocument(
to: Message,
document: InputFile,
thumb: InputFile? = null,
entities: List<TextSource>,
entities: List<dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSource>,
disableNotification: Boolean = false,
allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null,
@@ -186,7 +185,7 @@ suspend inline fun TelegramBot.replyWithDocument(
suspend inline fun TelegramBot.replyWithDocument(
to: Message,
document: DocumentFile,
entities: List<TextSource>,
entities: List<dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSource>,
disableNotification: Boolean = false,
allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null,
@@ -196,7 +195,7 @@ suspend inline fun TelegramBot.replyWithDocument(
suspend inline fun TelegramBot.reply(
to: Message,
document: DocumentFile,
entities: List<TextSource>,
entities: List<dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSource>,
disableNotification: Boolean = false,
allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null,

View File

@@ -1,6 +1,5 @@
package dev.inmo.tgbotapi.extensions.api.send.media
import dev.inmo.tgbotapi.CommonAbstracts.TextSource
import dev.inmo.tgbotapi.bot.TelegramBot
import dev.inmo.tgbotapi.requests.abstracts.InputFile
import dev.inmo.tgbotapi.requests.send.media.SendPhoto
@@ -102,7 +101,7 @@ suspend inline fun TelegramBot.reply(
suspend inline fun TelegramBot.sendPhoto(
chatId: ChatIdentifier,
fileId: InputFile,
entities: List<TextSource>,
entities: List<dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSource>,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
allowSendingWithoutReply: Boolean? = null,
@@ -122,7 +121,7 @@ suspend inline fun TelegramBot.sendPhoto(
suspend inline fun TelegramBot.sendPhoto(
chat: Chat,
fileId: InputFile,
entities: List<TextSource>,
entities: List<dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSource>,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
allowSendingWithoutReply: Boolean? = null,
@@ -132,7 +131,7 @@ suspend inline fun TelegramBot.sendPhoto(
suspend inline fun TelegramBot.sendPhoto(
chatId: ChatIdentifier,
photo: Photo,
entities: List<TextSource>,
entities: List<dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSource>,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
allowSendingWithoutReply: Boolean? = null,
@@ -142,7 +141,7 @@ suspend inline fun TelegramBot.sendPhoto(
suspend inline fun TelegramBot.sendPhoto(
chat: Chat,
photo: Photo,
entities: List<TextSource>,
entities: List<dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSource>,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
allowSendingWithoutReply: Boolean? = null,
@@ -152,7 +151,7 @@ suspend inline fun TelegramBot.sendPhoto(
suspend inline fun TelegramBot.replyWithPhoto(
to: Message,
fileId: InputFile,
entities: List<TextSource>,
entities: List<dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSource>,
disableNotification: Boolean = false,
allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null
@@ -161,7 +160,7 @@ suspend inline fun TelegramBot.replyWithPhoto(
suspend inline fun TelegramBot.replyWithPhoto(
to: Message,
photo: Photo,
entities: List<TextSource>,
entities: List<dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSource>,
disableNotification: Boolean = false,
allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null
@@ -170,7 +169,7 @@ suspend inline fun TelegramBot.replyWithPhoto(
suspend inline fun TelegramBot.reply(
to: Message,
photo: Photo,
entities: List<TextSource>,
entities: List<dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSource>,
disableNotification: Boolean = false,
allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null

View File

@@ -1,6 +1,5 @@
package dev.inmo.tgbotapi.extensions.api.send.media
import dev.inmo.tgbotapi.CommonAbstracts.TextSource
import dev.inmo.tgbotapi.bot.TelegramBot
import dev.inmo.tgbotapi.requests.abstracts.InputFile
import dev.inmo.tgbotapi.requests.send.media.SendVideo
@@ -120,7 +119,7 @@ suspend inline fun TelegramBot.sendVideo(
chatId: ChatIdentifier,
video: InputFile,
thumb: InputFile? = null,
entities: List<TextSource>,
entities: List<dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSource>,
duration: Long? = null,
width: Int? = null,
height: Int? = null,
@@ -148,7 +147,7 @@ suspend inline fun TelegramBot.sendVideo(
suspend inline fun TelegramBot.sendVideo(
chatId: ChatIdentifier,
video: VideoFile,
entities: List<TextSource>,
entities: List<dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSource>,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
allowSendingWithoutReply: Boolean? = null,
@@ -159,7 +158,7 @@ suspend inline fun TelegramBot.sendVideo(
chat: Chat,
video: InputFile,
thumb: InputFile? = null,
entities: List<TextSource>,
entities: List<dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSource>,
duration: Long? = null,
width: Int? = null,
height: Int? = null,
@@ -173,7 +172,7 @@ suspend inline fun TelegramBot.sendVideo(
suspend inline fun TelegramBot.sendVideo(
chat: Chat,
video: VideoFile,
entities: List<TextSource>,
entities: List<dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSource>,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
allowSendingWithoutReply: Boolean? = null,
@@ -184,7 +183,7 @@ suspend inline fun TelegramBot.replyWithVideo(
to: Message,
video: InputFile,
thumb: InputFile? = null,
entities: List<TextSource>,
entities: List<dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSource>,
duration: Long? = null,
width: Int? = null,
height: Int? = null,
@@ -196,7 +195,7 @@ suspend inline fun TelegramBot.replyWithVideo(
suspend inline fun TelegramBot.replyWithVideo(
to: Message,
video: VideoFile,
entities: List<TextSource>,
entities: List<dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSource>,
disableNotification: Boolean = false,
allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null
@@ -205,7 +204,7 @@ suspend inline fun TelegramBot.replyWithVideo(
suspend inline fun TelegramBot.reply(
to: Message,
video: VideoFile,
entities: List<TextSource>,
entities: List<dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSource>,
disableNotification: Boolean = false,
allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null

View File

@@ -1,6 +1,5 @@
package dev.inmo.tgbotapi.extensions.api.send.media
import dev.inmo.tgbotapi.CommonAbstracts.TextSource
import dev.inmo.tgbotapi.bot.TelegramBot
import dev.inmo.tgbotapi.requests.abstracts.InputFile
import dev.inmo.tgbotapi.requests.send.media.SendVoice
@@ -107,7 +106,7 @@ suspend inline fun TelegramBot.reply(
suspend inline fun TelegramBot.sendVoice(
chatId: ChatIdentifier,
voice: InputFile,
entities: List<TextSource>,
entities: List<dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSource>,
duration: Long? = null,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
@@ -129,7 +128,7 @@ suspend inline fun TelegramBot.sendVoice(
suspend inline fun TelegramBot.sendVoice(
chat: Chat,
voice: InputFile,
entities: List<TextSource>,
entities: List<dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSource>,
duration: Long? = null,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
@@ -140,7 +139,7 @@ suspend inline fun TelegramBot.sendVoice(
suspend inline fun TelegramBot.sendVoice(
chatId: ChatIdentifier,
voice: VoiceFile,
entities: List<TextSource>,
entities: List<dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSource>,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
allowSendingWithoutReply: Boolean? = null,
@@ -152,7 +151,7 @@ suspend inline fun TelegramBot.sendVoice(
suspend inline fun TelegramBot.sendVoice(
chat: Chat,
voice: VoiceFile,
entities: List<TextSource>,
entities: List<dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSource>,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
allowSendingWithoutReply: Boolean? = null,
@@ -162,7 +161,7 @@ suspend inline fun TelegramBot.sendVoice(
suspend inline fun TelegramBot.replyWithVoice(
to: Message,
voice: InputFile,
entities: List<TextSource>,
entities: List<dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSource>,
duration: Long? = null,
disableNotification: Boolean = false,
allowSendingWithoutReply: Boolean? = null,
@@ -172,7 +171,7 @@ suspend inline fun TelegramBot.replyWithVoice(
suspend inline fun TelegramBot.replyWithVoice(
to: Message,
voice: VoiceFile,
entities: List<TextSource>,
entities: List<dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSource>,
disableNotification: Boolean = false,
allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null
@@ -181,7 +180,7 @@ suspend inline fun TelegramBot.replyWithVoice(
suspend inline fun TelegramBot.reply(
to: Message,
voice: VoiceFile,
entities: List<TextSource>,
entities: List<dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSource>,
disableNotification: Boolean = false,
allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null

View File

@@ -1,6 +1,5 @@
package dev.inmo.tgbotapi.extensions.api.send.polls
import dev.inmo.tgbotapi.CommonAbstracts.TextSource
import dev.inmo.tgbotapi.bot.TelegramBot
import dev.inmo.tgbotapi.requests.send.polls.SendQuizPoll
import dev.inmo.tgbotapi.requests.send.polls.SendRegularPoll
@@ -162,7 +161,7 @@ suspend inline fun TelegramBot.sendQuizPoll(
correctOptionId: Int,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
entities: List<TextSource>,
entities: List<dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSource>,
closeInfo: ScheduledCloseInfo? = null,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
@@ -181,7 +180,7 @@ suspend inline fun TelegramBot.sendQuizPoll(
correctOptionId: Int,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
entities: List<TextSource>,
entities: List<dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSource>,
closeInfo: ScheduledCloseInfo? = null,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
@@ -199,7 +198,7 @@ suspend inline fun TelegramBot.sendQuizPoll(
options: List<String> = quizPoll.options.map { it.text },
correctOptionId: Int = quizPoll.correctOptionId ?: error("Correct option ID must be provided by income QuizPoll or by developer"),
isAnonymous: Boolean = quizPoll.isAnonymous,
entities: List<TextSource>,
entities: List<dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSource>,
closeInfo: ScheduledCloseInfo? = null,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
@@ -217,7 +216,7 @@ suspend inline fun TelegramBot.sendQuizPoll(
options: List<String> = quizPoll.options.map { it.text },
correctOptionId: Int = quizPoll.correctOptionId ?: error("Correct option ID must be provided by income QuizPoll or by developer"),
isAnonymous: Boolean = quizPoll.isAnonymous,
entities: List<TextSource>,
entities: List<dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSource>,
closeInfo: ScheduledCloseInfo? = null,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
@@ -292,7 +291,7 @@ suspend inline fun TelegramBot.replyWithQuizPoll(
correctOptionId: Int,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
entities: List<TextSource>,
entities: List<dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSource>,
closeInfo: ScheduledCloseInfo? = null,
disableNotification: Boolean = false,
allowSendingWithoutReply: Boolean? = null,
@@ -307,7 +306,7 @@ suspend inline fun TelegramBot.replyWithQuizPoll(
options: List<String> = quizPoll.options.map { it.text },
correctOptionId: Int = quizPoll.correctOptionId ?: error("Correct option ID must be provided by income QuizPoll or by developer"),
isAnonymous: Boolean = quizPoll.isAnonymous,
entities: List<TextSource>,
entities: List<dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSource>,
closeInfo: ScheduledCloseInfo? = null,
disableNotification: Boolean = false,
allowSendingWithoutReply: Boolean? = null,