add delay after each sent post
This commit is contained in:
parent
699defca3d
commit
e6302009bb
2
main.py
2
main.py
@ -2,6 +2,7 @@ import asyncio
|
|||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import random
|
import random
|
||||||
|
from asyncio import sleep
|
||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from tempfile import TemporaryFile, TemporaryDirectory
|
from tempfile import TemporaryFile, TemporaryDirectory
|
||||||
@ -122,6 +123,7 @@ async def check_updates():
|
|||||||
if already_sent[i]:
|
if already_sent[i]:
|
||||||
continue
|
continue
|
||||||
await send_post(posts[i], tag_list)
|
await send_post(posts[i], tag_list)
|
||||||
|
await sleep(.1)
|
||||||
|
|
||||||
|
|
||||||
@dp.message_handler(filters.IDFilter(chat_id=user_ids), commands=['add'])
|
@dp.message_handler(filters.IDFilter(chat_id=user_ids), commands=['add'])
|
||||||
|
Loading…
Reference in New Issue
Block a user