fix
This commit is contained in:
parent
02e5eeb7d5
commit
710669cd1c
4
main.py
4
main.py
@ -66,12 +66,12 @@ async def check_updates():
|
||||
elif post.file.ext in ('png', 'jpg'):
|
||||
file_resized = BytesIO()
|
||||
im = Image.open(file)
|
||||
im.thumbnail((2048, 2048), Image.ANTIALIAS)
|
||||
im.thumbnail((2048, 2048), Image.LANCZOS)
|
||||
im.save(file_resized, format='JPEG')
|
||||
im.name = 'file.jpg'
|
||||
im.seek(0)
|
||||
await bot.send_photo(int(os.environ['SEND_CHAT']),
|
||||
im,
|
||||
file_resized,
|
||||
caption=caption)
|
||||
await redis.sadd('e621:sent', post.id)
|
||||
except exceptions.TelegramAPIError as e:
|
||||
|
Loading…
Reference in New Issue
Block a user