I need this part of script work infinitely(send messages), but it works only one time and then stops
f = open('text.txt')
t = 1
with app:
while True:
for line in f.readlines():
try:
app.send_message(chat_id=line[13:].rstrip(), text=txt)
print(f"Успешно написал в чат по ссылке {line}")
time.sleep(0.5)
except:
print(f"Что-то пошло не так... Возможно в чате {line} включен медленный режим")```
while
loop, or seek back to the beginning.