mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2021-05-13 03:08:02 +03:00
Updated sendMediaGroup method
This commit is contained in:
@@ -1981,7 +1981,8 @@ class InputMediaPhoto(JsonSerializable):
|
||||
return json.dumps(self.to_dic())
|
||||
|
||||
def to_dic(self):
|
||||
ret = {'type': self.type, 'media': self.media}
|
||||
ret = {'type': self.type, 'media': 'attach://' + util.generate_random_token()
|
||||
if not util.is_string(self.media) else self.media}
|
||||
if self.caption:
|
||||
ret['caption'] = self.caption
|
||||
return ret
|
||||
@@ -2000,7 +2001,8 @@ class InputMediaVideo(JsonSerializable):
|
||||
return json.dumps(self.to_dic())
|
||||
|
||||
def to_dic(self):
|
||||
ret = {'type': self.type, 'media': self.media}
|
||||
ret = {'type': self.type, 'media': 'attach://' + util.generate_random_token()
|
||||
if not util.is_string(self.media) else self.media}
|
||||
if self.caption:
|
||||
ret['caption'] = self.caption
|
||||
if self.width:
|
||||
|
||||
Reference in New Issue
Block a user