pyTelegramBotAPI icon indicating copy to clipboard operation
pyTelegramBotAPI copied to clipboard

Send media group

Open Latand opened this issue 8 years ago • 1 comments

Hello! There has been new feature released "sendMediaGroup", I had found some lines of this in your code, however I tried various ways and noone has worked. I passed the array of a strings in media like ["2.jpg", "3.jpg"], which are in the same folder with .py. I also tried to pass the file_ids of the photos.

Getting the error "2018-02-11 10:24:02,895 (util.py:64 WorkerThread1) ERROR - TeleBot: "ApiException occurred, args=('A request to the Telegram API was unsuccessful. The server returned HTTP 400 Bad Request. Response body:\n[b'{"ok":false,"error_code":400,"description":"Bad Request: there is no messages to send"}']',)"

Here is a part of the code : bot = telebot.TeleBot(play.token) bot.send_media_group(chatid, media = ["2.jpg","3.jpg"]) #bot.send_media_group(chatid, media = ["gjC88yTQUjzQQJMw4ABDqlv6KjL","RagxGxW-AUhLsVqme5baq"])

Does it suppose to work?

BTW, Can I edit message of sendmediaGroup?

  1. What version of pyTelegramBotAPI are you using? latest, updated just today
  2. What OS are you using? Windows 10
  3. What version of python are you using? python 3.6.3

Latand avatar Feb 11 '18 10:02 Latand

@Latand https://github.com/eternnoir/pyTelegramBotAPI/pull/445 see an example

heyyyoyy avatar Feb 14 '18 20:02 heyyyoyy