nice working and testing
This commit is contained in:
@@ -232,11 +232,11 @@ def make_json_object():
|
||||
|
||||
# Добавляем приветственное сообщение каждые 10 минут
|
||||
current_second = int(time.time())
|
||||
if current_second % 600 <= 5:
|
||||
if current_second % 1000 <= 5:
|
||||
# Проверяем, есть ли приветственное сообщение от Eikichi-bot в последних 20 сообщениях
|
||||
has_recent_hello = any(
|
||||
comment.get('sendr') == 'Eikichi-bot' and comment.get('type') == 'hello'
|
||||
for comment in all_comments[-20:] # Последние 20 сообщений
|
||||
for comment in all_comments[-40:] # Последние 20 сообщений
|
||||
)
|
||||
|
||||
if not has_recent_hello:
|
||||
|
||||
Reference in New Issue
Block a user