|
|
|
@ -63,13 +63,17 @@ async def check_updates():
|
|
|
|
|
file.name = f'file.{post.file.ext}'
|
|
|
|
|
file.seek(0)
|
|
|
|
|
if post.file.ext == 'webm':
|
|
|
|
|
await bot.send_video(int(os.environ['SEND_CHAT']),
|
|
|
|
|
file,
|
|
|
|
|
width=post.file.width,
|
|
|
|
|
height=post.file.height,
|
|
|
|
|
thumb=post.preview.url,
|
|
|
|
|
caption=caption,
|
|
|
|
|
parse_mode=ParseMode.HTML)
|
|
|
|
|
if post.file.size < 50_000_000:
|
|
|
|
|
await bot.send_video(int(os.environ['SEND_CHAT']),
|
|
|
|
|
file,
|
|
|
|
|
width=post.file.width,
|
|
|
|
|
height=post.file.height,
|
|
|
|
|
thumb=post.preview.url,
|
|
|
|
|
caption=caption,
|
|
|
|
|
parse_mode=ParseMode.HTML)
|
|
|
|
|
else:
|
|
|
|
|
await bot.send_message(int(os.environ['SEND_CHAT']),
|
|
|
|
|
f'File is too large: {post.file.url}\n\n' + caption)
|
|
|
|
|
elif post.file.ext == 'gif':
|
|
|
|
|
await bot.send_animation(int(os.environ['SEND_CHAT']),
|
|
|
|
|
file,
|
|
|
|
|