workaround
This commit is contained in:
parent
85f1e3d54e
commit
c548bc09e6
25
main.py
25
main.py
@ -37,18 +37,19 @@ async def check_updates():
|
||||
f'Artist: {" ".join(post.tags.artist)}\n' \
|
||||
f'Character: {" ".join(post.tags.character)}\n\n' \
|
||||
f'https://e621.net/posts/{post.id}'
|
||||
if post.file.ext == 'webm':
|
||||
await bot.send_video(int(os.environ['SEND_CHAT']),
|
||||
post.file.url,
|
||||
width=post.file.width,
|
||||
height=post.file.height,
|
||||
thumb=post.preview.url,
|
||||
caption=caption)
|
||||
else:
|
||||
await bot.send_photo(int(os.environ['SEND_CHAT']),
|
||||
post.file.url,
|
||||
caption=caption)
|
||||
await redis.sadd('e621:sent', post.id)
|
||||
if post.file.url:
|
||||
if post.file.ext == 'webm':
|
||||
await bot.send_video(int(os.environ['SEND_CHAT']),
|
||||
post.file.url,
|
||||
width=post.file.width,
|
||||
height=post.file.height,
|
||||
thumb=post.preview.url,
|
||||
caption=caption)
|
||||
else:
|
||||
await bot.send_photo(int(os.environ['SEND_CHAT']),
|
||||
post.file.url,
|
||||
caption=caption)
|
||||
await redis.sadd('e621:sent', post.id)
|
||||
|
||||
|
||||
@dp.message_handler(commands=['add'])
|
||||
|
Loading…
Reference in New Issue
Block a user