Skip to content

Commit 2da3f0d

Browse files
committed
Merge branch 'master' of github.com:ba0f3/telebot.nim
2 parents 33d105d + 58ec6bc commit 2da3f0d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

telebot/api.nim

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ proc setChatPhoto*(b: TeleBot, chatId: string, photo: string): Future[bool] {.as
278278
END_POINT("setChatPhoto")
279279
var data = newMultipartData()
280280
data["chat_id"] = chatId
281-
data.addFiles({"name": "photo", "file": photo})
281+
data.addFiles({"photo": photo})
282282
let res = await makeRequest(b, endpoint % b.token, data)
283283
result = res.toBool
284284

@@ -372,7 +372,7 @@ proc uploadStickerFile*(b: TeleBot, userId: int, pngSticker: string): Future[typ
372372
END_POINT("uploadStickerFile")
373373
var data = newMultipartData()
374374
data["user_id"] = $userId
375-
data.addFiles({"name": "png_sticker", "file": pngSticker})
375+
data.addFiles({"png_sticker": pngSticker})
376376
let res = await makeRequest(b, endpoint % b.token, data)
377377
result = unmarshal(res, types.File)
378378

@@ -382,7 +382,7 @@ proc createNewStickerSet*(b: TeleBot, userId: int, name: string, title: string,
382382
data["user_id"] = $userId
383383
data["name"] = name
384384
data["title"] = title
385-
data.addFiles({"name": "png_sticker", "file": pngSticker})
385+
data.addFiles({"png_sticker": pngSticker})
386386
data["emojis"] = emojis
387387
if containsMasks:
388388
data["contains_masks"] = "true"
@@ -398,7 +398,7 @@ proc addStickerToSet*(b: TeleBot, userId: int, name: string, pngSticker: string,
398398
var data = newMultipartData()
399399
data["user_id"] = $userId
400400
data["name"] = name
401-
data.addFiles({"name": "png_sticker", "file": pngSticker})
401+
data.addFiles({"png_sticker": pngSticker})
402402
data["emojis"] = emojis
403403
if maskPosition.isSome():
404404
var tmp = ""

0 commit comments

Comments
 (0)