From 5aa3e171d1ed9675496667e05265f748d6a797f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ebbe=20Ba=C3=9F?= Date: Tue, 9 Nov 2021 19:07:14 +0100 Subject: [PATCH] Update main.py --- main.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main.py b/main.py index f414ac5..76bd773 100644 --- a/main.py +++ b/main.py @@ -81,6 +81,10 @@ def read_idle(): def change_idle_mode(channel): global idle_mode + with open('./idle.txt', 'r') as f: + idle_mode = f.readline() + if int(idle_mode) > 7: + idle_mode = 0 with open('./idle.txt', 'w') as f: f.write(int(idle_mode) + 1) with open('./idle.txt', 'r') as f: