From d4fe4e4ae3aa8c44944a4e7d7ad54f8a8f10a92e Mon Sep 17 00:00:00 2001 From: ghost Date: Thu, 21 Dec 2023 10:28:50 +0200 Subject: [PATCH] add queue delay config --- config.example.json | 6 ++++-- src/cli/bot.php | 5 +++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/config.example.json b/config.example.json index 1ca13b6..da275f9 100644 --- a/config.example.json +++ b/config.example.json @@ -20,7 +20,8 @@ "target":"user1", "queue": { - "limit":5 + "limit":5, + "delay":5 }, "keywords": [ @@ -33,7 +34,8 @@ "target":"user2", "queue": { - "limit":5 + "limit":5, + "delay":5 }, "keywords": [ diff --git a/src/cli/bot.php b/src/cli/bot.php index 820d407..f422dff 100644 --- a/src/cli/bot.php +++ b/src/cli/bot.php @@ -219,5 +219,10 @@ foreach ($config->feed as $feed) $queue->id ) ); + + // Apply delay + delay( + $feed->queue->delay + ); } }