Update main.py

master
Ebbe Baß 2021-11-09 19:07:14 +01:00
parent 93ce452ad7
commit 5aa3e171d1
1 changed files with 4 additions and 0 deletions

View File

@ -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: