mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-22 16:23:48 +00:00
fixes
This commit is contained in:
parent
40617ad9c8
commit
300f94fd48
@ -410,6 +410,7 @@ suspend inline fun TelegramBot.replyWithAnimation(
|
|||||||
thumb: InputFile? = null,
|
thumb: InputFile? = null,
|
||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
|
spoilered: Boolean = false,
|
||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
width: Int? = null,
|
width: Int? = null,
|
||||||
height: Int? = null,
|
height: Int? = null,
|
||||||
@ -424,6 +425,7 @@ suspend inline fun TelegramBot.replyWithAnimation(
|
|||||||
thumb,
|
thumb,
|
||||||
text,
|
text,
|
||||||
parseMode,
|
parseMode,
|
||||||
|
spoilered,
|
||||||
duration,
|
duration,
|
||||||
width,
|
width,
|
||||||
height,
|
height,
|
||||||
@ -441,6 +443,7 @@ suspend inline fun TelegramBot.reply(
|
|||||||
animation: AnimationFile,
|
animation: AnimationFile,
|
||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
|
spoilered: Boolean = false,
|
||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
width: Int? = null,
|
width: Int? = null,
|
||||||
height: Int? = null,
|
height: Int? = null,
|
||||||
@ -449,13 +452,14 @@ suspend inline fun TelegramBot.reply(
|
|||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendAnimation(toChatId, animation, text, parseMode, duration, width, height, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendAnimation(toChatId, animation, text, parseMode, spoilered, duration, width, height, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
suspend inline fun TelegramBot.replyWithAnimation(
|
suspend inline fun TelegramBot.replyWithAnimation(
|
||||||
toChatId: IdChatIdentifier,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
animation: InputFile,
|
animation: InputFile,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
|
spoilered: Boolean = false,
|
||||||
thumb: InputFile? = null,
|
thumb: InputFile? = null,
|
||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
width: Int? = null,
|
width: Int? = null,
|
||||||
@ -470,6 +474,7 @@ suspend inline fun TelegramBot.replyWithAnimation(
|
|||||||
animation,
|
animation,
|
||||||
thumb,
|
thumb,
|
||||||
entities,
|
entities,
|
||||||
|
spoilered,
|
||||||
duration,
|
duration,
|
||||||
width,
|
width,
|
||||||
height,
|
height,
|
||||||
@ -486,6 +491,7 @@ suspend inline fun TelegramBot.reply(
|
|||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
animation: AnimationFile,
|
animation: AnimationFile,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
|
spoilered: Boolean = false,
|
||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
width: Int? = null,
|
width: Int? = null,
|
||||||
height: Int? = null,
|
height: Int? = null,
|
||||||
@ -494,7 +500,7 @@ suspend inline fun TelegramBot.reply(
|
|||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendAnimation(toChatId, animation, entities, duration, width, height, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendAnimation(toChatId, animation, entities, spoilered, duration, width, height, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
|
|
||||||
// Audio
|
// Audio
|
||||||
@ -671,12 +677,13 @@ suspend inline fun TelegramBot.replyWithPhoto(
|
|||||||
fileId: InputFile,
|
fileId: InputFile,
|
||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
|
spoilered: Boolean = false,
|
||||||
threadId: MessageThreadId? = toChatId.threadId,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendPhoto(toChatId, fileId, text, parseMode, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendPhoto(toChatId, fileId, text, parseMode, spoilered, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
suspend inline fun TelegramBot.reply(
|
suspend inline fun TelegramBot.reply(
|
||||||
toChatId: IdChatIdentifier,
|
toChatId: IdChatIdentifier,
|
||||||
@ -684,12 +691,13 @@ suspend inline fun TelegramBot.reply(
|
|||||||
photo: Photo,
|
photo: Photo,
|
||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
|
spoilered: Boolean = false,
|
||||||
threadId: MessageThreadId? = toChatId.threadId,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendPhoto(toChatId, photo, text, parseMode, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendPhoto(toChatId, photo, text, parseMode, spoilered, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
suspend inline fun TelegramBot.reply(
|
suspend inline fun TelegramBot.reply(
|
||||||
toChatId: IdChatIdentifier,
|
toChatId: IdChatIdentifier,
|
||||||
@ -697,12 +705,13 @@ suspend inline fun TelegramBot.reply(
|
|||||||
photoSize: PhotoSize,
|
photoSize: PhotoSize,
|
||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
|
spoilered: Boolean = false,
|
||||||
threadId: MessageThreadId? = toChatId.threadId,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendPhoto(toChatId, photoSize, text, parseMode, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendPhoto(toChatId, photoSize, text, parseMode, spoilered, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
|
|
||||||
suspend inline fun TelegramBot.replyWithPhoto(
|
suspend inline fun TelegramBot.replyWithPhoto(
|
||||||
@ -710,36 +719,39 @@ suspend inline fun TelegramBot.replyWithPhoto(
|
|||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
fileId: InputFile,
|
fileId: InputFile,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
|
spoilered: Boolean = false,
|
||||||
threadId: MessageThreadId? = toChatId.threadId,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendPhoto(toChatId, fileId, entities, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendPhoto(toChatId, fileId, entities, spoilered, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
suspend inline fun TelegramBot.reply(
|
suspend inline fun TelegramBot.reply(
|
||||||
toChatId: IdChatIdentifier,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
photo: Photo,
|
photo: Photo,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
|
spoilered: Boolean = false,
|
||||||
threadId: MessageThreadId? = toChatId.threadId,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendPhoto(toChatId, photo, entities, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendPhoto(toChatId, photo, entities, spoilered, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
suspend inline fun TelegramBot.reply(
|
suspend inline fun TelegramBot.reply(
|
||||||
toChatId: IdChatIdentifier,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
photoSize: PhotoSize,
|
photoSize: PhotoSize,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
|
spoilered: Boolean = false,
|
||||||
threadId: MessageThreadId? = toChatId.threadId,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendPhoto(toChatId, photoSize, entities, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendPhoto(toChatId, photoSize, entities, spoilered, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
|
|
||||||
// Sticker
|
// Sticker
|
||||||
@ -776,6 +788,7 @@ suspend inline fun TelegramBot.replyWithVideo(
|
|||||||
thumb: InputFile? = null,
|
thumb: InputFile? = null,
|
||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
|
spoilered: Boolean = false,
|
||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
width: Int? = null,
|
width: Int? = null,
|
||||||
height: Int? = null,
|
height: Int? = null,
|
||||||
@ -784,7 +797,7 @@ suspend inline fun TelegramBot.replyWithVideo(
|
|||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendVideo(toChatId, video, thumb, text, parseMode, duration, width, height, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendVideo(toChatId, video, thumb, text, parseMode, spoilered, duration, width, height, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
suspend inline fun TelegramBot.reply(
|
suspend inline fun TelegramBot.reply(
|
||||||
toChatId: IdChatIdentifier,
|
toChatId: IdChatIdentifier,
|
||||||
@ -792,12 +805,13 @@ suspend inline fun TelegramBot.reply(
|
|||||||
video: VideoFile,
|
video: VideoFile,
|
||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
|
spoilered: Boolean = false,
|
||||||
threadId: MessageThreadId? = toChatId.threadId,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendVideo(toChatId, video, text, parseMode, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendVideo(toChatId, video, text, parseMode, spoilered, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
suspend inline fun TelegramBot.replyWithVideo(
|
suspend inline fun TelegramBot.replyWithVideo(
|
||||||
toChatId: IdChatIdentifier,
|
toChatId: IdChatIdentifier,
|
||||||
@ -805,6 +819,7 @@ suspend inline fun TelegramBot.replyWithVideo(
|
|||||||
video: InputFile,
|
video: InputFile,
|
||||||
thumb: InputFile? = null,
|
thumb: InputFile? = null,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
|
spoilered: Boolean = false,
|
||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
width: Int? = null,
|
width: Int? = null,
|
||||||
height: Int? = null,
|
height: Int? = null,
|
||||||
@ -813,19 +828,20 @@ suspend inline fun TelegramBot.replyWithVideo(
|
|||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendVideo(toChatId, video, thumb, entities, duration, width, height, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendVideo(toChatId, video, thumb, entities, spoilered, duration, width, height, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
suspend inline fun TelegramBot.reply(
|
suspend inline fun TelegramBot.reply(
|
||||||
toChatId: IdChatIdentifier,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
video: VideoFile,
|
video: VideoFile,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
|
spoilered: Boolean = false,
|
||||||
threadId: MessageThreadId? = toChatId.threadId,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendVideo(toChatId, video, entities, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendVideo(toChatId, video, entities, spoilered, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
|
|
||||||
// VideoNotes
|
// VideoNotes
|
||||||
|
@ -33,6 +33,7 @@ data class VideoContent(
|
|||||||
media.fileId,
|
media.fileId,
|
||||||
media.thumb ?.fileId,
|
media.thumb ?.fileId,
|
||||||
textSources,
|
textSources,
|
||||||
|
spoilered,
|
||||||
media.duration,
|
media.duration,
|
||||||
media.width,
|
media.width,
|
||||||
media.height,
|
media.height,
|
||||||
|
@ -213,6 +213,7 @@ import dev.inmo.tgbotapi.types.media.DocumentMediaGroupMemberTelegramMedia
|
|||||||
import dev.inmo.tgbotapi.types.media.DuratedTelegramMedia
|
import dev.inmo.tgbotapi.types.media.DuratedTelegramMedia
|
||||||
import dev.inmo.tgbotapi.types.media.MediaGroupMemberTelegramMedia
|
import dev.inmo.tgbotapi.types.media.MediaGroupMemberTelegramMedia
|
||||||
import dev.inmo.tgbotapi.types.media.SizedTelegramMedia
|
import dev.inmo.tgbotapi.types.media.SizedTelegramMedia
|
||||||
|
import dev.inmo.tgbotapi.types.media.SpoilerableTelegramMedia
|
||||||
import dev.inmo.tgbotapi.types.media.TelegramMedia
|
import dev.inmo.tgbotapi.types.media.TelegramMedia
|
||||||
import dev.inmo.tgbotapi.types.media.TelegramMediaAnimation
|
import dev.inmo.tgbotapi.types.media.TelegramMediaAnimation
|
||||||
import dev.inmo.tgbotapi.types.media.TelegramMediaAudio
|
import dev.inmo.tgbotapi.types.media.TelegramMediaAudio
|
||||||
@ -251,7 +252,11 @@ import dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.SupergroupEvent
|
|||||||
import dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.VideoChatEvent
|
import dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.VideoChatEvent
|
||||||
import dev.inmo.tgbotapi.types.message.ChatEvents.forum.ForumTopicClosed
|
import dev.inmo.tgbotapi.types.message.ChatEvents.forum.ForumTopicClosed
|
||||||
import dev.inmo.tgbotapi.types.message.ChatEvents.forum.ForumTopicCreated
|
import dev.inmo.tgbotapi.types.message.ChatEvents.forum.ForumTopicCreated
|
||||||
|
import dev.inmo.tgbotapi.types.message.ChatEvents.forum.ForumTopicEdited
|
||||||
import dev.inmo.tgbotapi.types.message.ChatEvents.forum.ForumTopicReopened
|
import dev.inmo.tgbotapi.types.message.ChatEvents.forum.ForumTopicReopened
|
||||||
|
import dev.inmo.tgbotapi.types.message.ChatEvents.forum.GeneralForumTopicHidden
|
||||||
|
import dev.inmo.tgbotapi.types.message.ChatEvents.forum.GeneralForumTopicUnhidden
|
||||||
|
import dev.inmo.tgbotapi.types.message.ChatEvents.forum.WriteAccessAllowed
|
||||||
import dev.inmo.tgbotapi.types.message.ChatEvents.voice.VideoChatEnded
|
import dev.inmo.tgbotapi.types.message.ChatEvents.voice.VideoChatEnded
|
||||||
import dev.inmo.tgbotapi.types.message.ChatEvents.voice.VideoChatParticipantsInvited
|
import dev.inmo.tgbotapi.types.message.ChatEvents.voice.VideoChatParticipantsInvited
|
||||||
import dev.inmo.tgbotapi.types.message.ChatEvents.voice.VideoChatScheduled
|
import dev.inmo.tgbotapi.types.message.ChatEvents.voice.VideoChatScheduled
|
||||||
@ -315,6 +320,7 @@ import dev.inmo.tgbotapi.types.message.content.MessageContent
|
|||||||
import dev.inmo.tgbotapi.types.message.content.PhotoContent
|
import dev.inmo.tgbotapi.types.message.content.PhotoContent
|
||||||
import dev.inmo.tgbotapi.types.message.content.PollContent
|
import dev.inmo.tgbotapi.types.message.content.PollContent
|
||||||
import dev.inmo.tgbotapi.types.message.content.ResendableContent
|
import dev.inmo.tgbotapi.types.message.content.ResendableContent
|
||||||
|
import dev.inmo.tgbotapi.types.message.content.SpoilerableMediaContent
|
||||||
import dev.inmo.tgbotapi.types.message.content.StaticLocationContent
|
import dev.inmo.tgbotapi.types.message.content.StaticLocationContent
|
||||||
import dev.inmo.tgbotapi.types.message.content.StickerContent
|
import dev.inmo.tgbotapi.types.message.content.StickerContent
|
||||||
import dev.inmo.tgbotapi.types.message.content.TextContent
|
import dev.inmo.tgbotapi.types.message.content.TextContent
|
||||||
@ -2643,6 +2649,16 @@ public inline fun TelegramMedia.sizedTelegramMediaOrThrow(): SizedTelegramMedia
|
|||||||
public inline fun <T> TelegramMedia.ifSizedTelegramMedia(block: (SizedTelegramMedia) -> T): T? =
|
public inline fun <T> TelegramMedia.ifSizedTelegramMedia(block: (SizedTelegramMedia) -> T): T? =
|
||||||
sizedTelegramMediaOrNull() ?.let(block)
|
sizedTelegramMediaOrNull() ?.let(block)
|
||||||
|
|
||||||
|
public inline fun TelegramMedia.spoilerableTelegramMediaOrNull(): SpoilerableTelegramMedia? = this
|
||||||
|
as? dev.inmo.tgbotapi.types.media.SpoilerableTelegramMedia
|
||||||
|
|
||||||
|
public inline fun TelegramMedia.spoilerableTelegramMediaOrThrow(): SpoilerableTelegramMedia = this
|
||||||
|
as dev.inmo.tgbotapi.types.media.SpoilerableTelegramMedia
|
||||||
|
|
||||||
|
public inline fun <T>
|
||||||
|
TelegramMedia.ifSpoilerableTelegramMedia(block: (SpoilerableTelegramMedia) -> T): T? =
|
||||||
|
spoilerableTelegramMediaOrNull() ?.let(block)
|
||||||
|
|
||||||
public inline fun TelegramMedia.telegramMediaAnimationOrNull(): TelegramMediaAnimation? = this as?
|
public inline fun TelegramMedia.telegramMediaAnimationOrNull(): TelegramMediaAnimation? = this as?
|
||||||
dev.inmo.tgbotapi.types.media.TelegramMediaAnimation
|
dev.inmo.tgbotapi.types.media.TelegramMediaAnimation
|
||||||
|
|
||||||
@ -2923,6 +2939,15 @@ public inline fun ChatEvent.forumTopicCreatedOrThrow(): ForumTopicCreated = this
|
|||||||
public inline fun <T> ChatEvent.ifForumTopicCreated(block: (ForumTopicCreated) -> T): T? =
|
public inline fun <T> ChatEvent.ifForumTopicCreated(block: (ForumTopicCreated) -> T): T? =
|
||||||
forumTopicCreatedOrNull() ?.let(block)
|
forumTopicCreatedOrNull() ?.let(block)
|
||||||
|
|
||||||
|
public inline fun ChatEvent.forumTopicEditedOrNull(): ForumTopicEdited? = this as?
|
||||||
|
dev.inmo.tgbotapi.types.message.ChatEvents.forum.ForumTopicEdited
|
||||||
|
|
||||||
|
public inline fun ChatEvent.forumTopicEditedOrThrow(): ForumTopicEdited = this as
|
||||||
|
dev.inmo.tgbotapi.types.message.ChatEvents.forum.ForumTopicEdited
|
||||||
|
|
||||||
|
public inline fun <T> ChatEvent.ifForumTopicEdited(block: (ForumTopicEdited) -> T): T? =
|
||||||
|
forumTopicEditedOrNull() ?.let(block)
|
||||||
|
|
||||||
public inline fun ChatEvent.forumTopicReopenedOrNull(): ForumTopicReopened? = this as?
|
public inline fun ChatEvent.forumTopicReopenedOrNull(): ForumTopicReopened? = this as?
|
||||||
dev.inmo.tgbotapi.types.message.ChatEvents.forum.ForumTopicReopened
|
dev.inmo.tgbotapi.types.message.ChatEvents.forum.ForumTopicReopened
|
||||||
|
|
||||||
@ -2932,6 +2957,34 @@ public inline fun ChatEvent.forumTopicReopenedOrThrow(): ForumTopicReopened = th
|
|||||||
public inline fun <T> ChatEvent.ifForumTopicReopened(block: (ForumTopicReopened) -> T): T? =
|
public inline fun <T> ChatEvent.ifForumTopicReopened(block: (ForumTopicReopened) -> T): T? =
|
||||||
forumTopicReopenedOrNull() ?.let(block)
|
forumTopicReopenedOrNull() ?.let(block)
|
||||||
|
|
||||||
|
public inline fun ChatEvent.generalForumTopicHiddenOrNull(): GeneralForumTopicHidden? = this as?
|
||||||
|
dev.inmo.tgbotapi.types.message.ChatEvents.forum.GeneralForumTopicHidden
|
||||||
|
|
||||||
|
public inline fun ChatEvent.generalForumTopicHiddenOrThrow(): GeneralForumTopicHidden = this as
|
||||||
|
dev.inmo.tgbotapi.types.message.ChatEvents.forum.GeneralForumTopicHidden
|
||||||
|
|
||||||
|
public inline fun <T> ChatEvent.ifGeneralForumTopicHidden(block: (GeneralForumTopicHidden) -> T): T?
|
||||||
|
= generalForumTopicHiddenOrNull() ?.let(block)
|
||||||
|
|
||||||
|
public inline fun ChatEvent.generalForumTopicUnhiddenOrNull(): GeneralForumTopicUnhidden? = this as?
|
||||||
|
dev.inmo.tgbotapi.types.message.ChatEvents.forum.GeneralForumTopicUnhidden
|
||||||
|
|
||||||
|
public inline fun ChatEvent.generalForumTopicUnhiddenOrThrow(): GeneralForumTopicUnhidden = this as
|
||||||
|
dev.inmo.tgbotapi.types.message.ChatEvents.forum.GeneralForumTopicUnhidden
|
||||||
|
|
||||||
|
public inline fun <T>
|
||||||
|
ChatEvent.ifGeneralForumTopicUnhidden(block: (GeneralForumTopicUnhidden) -> T): T? =
|
||||||
|
generalForumTopicUnhiddenOrNull() ?.let(block)
|
||||||
|
|
||||||
|
public inline fun ChatEvent.writeAccessAllowedOrNull(): WriteAccessAllowed? = this as?
|
||||||
|
dev.inmo.tgbotapi.types.message.ChatEvents.forum.WriteAccessAllowed
|
||||||
|
|
||||||
|
public inline fun ChatEvent.writeAccessAllowedOrThrow(): WriteAccessAllowed = this as
|
||||||
|
dev.inmo.tgbotapi.types.message.ChatEvents.forum.WriteAccessAllowed
|
||||||
|
|
||||||
|
public inline fun <T> ChatEvent.ifWriteAccessAllowed(block: (WriteAccessAllowed) -> T): T? =
|
||||||
|
writeAccessAllowedOrNull() ?.let(block)
|
||||||
|
|
||||||
public inline fun ChatEvent.videoChatEndedOrNull(): VideoChatEnded? = this as?
|
public inline fun ChatEvent.videoChatEndedOrNull(): VideoChatEnded? = this as?
|
||||||
dev.inmo.tgbotapi.types.message.ChatEvents.voice.VideoChatEnded
|
dev.inmo.tgbotapi.types.message.ChatEvents.voice.VideoChatEnded
|
||||||
|
|
||||||
@ -3516,6 +3569,16 @@ public inline fun ResendableContent.mediaContentOrThrow(): MediaContent = this a
|
|||||||
public inline fun <T> ResendableContent.ifMediaContent(block: (MediaContent) -> T): T? =
|
public inline fun <T> ResendableContent.ifMediaContent(block: (MediaContent) -> T): T? =
|
||||||
mediaContentOrNull() ?.let(block)
|
mediaContentOrNull() ?.let(block)
|
||||||
|
|
||||||
|
public inline fun ResendableContent.spoilerableMediaContentOrNull(): SpoilerableMediaContent? = this
|
||||||
|
as? dev.inmo.tgbotapi.types.message.content.SpoilerableMediaContent
|
||||||
|
|
||||||
|
public inline fun ResendableContent.spoilerableMediaContentOrThrow(): SpoilerableMediaContent = this
|
||||||
|
as dev.inmo.tgbotapi.types.message.content.SpoilerableMediaContent
|
||||||
|
|
||||||
|
public inline fun <T>
|
||||||
|
ResendableContent.ifSpoilerableMediaContent(block: (SpoilerableMediaContent) -> T): T? =
|
||||||
|
spoilerableMediaContentOrNull() ?.let(block)
|
||||||
|
|
||||||
public inline fun ResendableContent.audioMediaGroupPartContentOrNull(): AudioMediaGroupPartContent?
|
public inline fun ResendableContent.audioMediaGroupPartContentOrNull(): AudioMediaGroupPartContent?
|
||||||
= this as? dev.inmo.tgbotapi.types.message.content.AudioMediaGroupPartContent
|
= this as? dev.inmo.tgbotapi.types.message.content.AudioMediaGroupPartContent
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user