Skip to content

Commit bd96dc3

Browse files
committed
Make it compikle w/ InputMediaSet, refs #55
1 parent 09ebd16 commit bd96dc3

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/telebot/private/api.nim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -875,7 +875,7 @@ proc stopMessageLiveLocation*(b: TeleBot, chatId = "", messageId = 0, inlineMess
875875
let res = await makeRequest(b, endpoint % b.token, data)
876876
result = res.toBool
877877

878-
proc sendMediaGroup*(b: TeleBot, chatId = "", media: seq[InputMedia], disableNotification = false,
878+
proc sendMediaGroup*(b: TeleBot, chatId = "", media: seq[InputMediaSet], disableNotification = false,
879879
allowSendingWithoutReply = false, replyToMessageId = 0): Future[bool] {.async.} =
880880
END_POINT("sendMediaGroup")
881881
var data = newMultipartData()
@@ -895,7 +895,7 @@ proc sendMediaGroup*(b: TeleBot, chatId = "", media: seq[InputMedia], disableNot
895895
let res = await makeRequest(b, endpoint % b.token, data)
896896
result = res.toBool
897897

898-
proc editMessageMedia*(b: TeleBot, media: InputMedia, chatId = "", messageId = 0, inlineMessageId = "", replyMarkup: KeyboardMarkup = nil): Future[Option[Message]] {.async.} =
898+
proc editMessageMedia*(b: TeleBot, media: InputMediaSet, chatId = "", messageId = 0, inlineMessageId = "", replyMarkup: KeyboardMarkup = nil): Future[Option[Message]] {.async.} =
899899
END_POINT("editMessageMedia")
900900
var data = newMultipartData()
901901
if chatId.len > 0:

src/telebot/private/types.nim

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -687,6 +687,9 @@ type
687687
InputMediaDocument* = ref object of InputMedia
688688
disableContentTypeDetection*: Option[bool]
689689
690+
691+
InputMediaSet* = InputMediaPhoto|InputMediaVideo|InputMediaAnimation|InputMediaAudio|InputMediaDocument
692+
690693
#------------------
691694
# Passport
692695
#------------------

0 commit comments

Comments
 (0)