auto-schedule-pro: replace loops with remainder operation to increase performance when looking up large amounts of days
This commit is contained in:
parent
759b7517ef
commit
c4f6e952bc
|
@ -177,10 +177,7 @@ if self.MESSAGE["text"].lower().split()[0] == "!пари":
|
||||||
print(f"[auto-schedule-pro:error] Got exception '{e}' while parsing {command[1]}")
|
print(f"[auto-schedule-pro:error] Got exception '{e}' while parsing {command[1]}")
|
||||||
|
|
||||||
# keeping day in bounds
|
# keeping day in bounds
|
||||||
while selected_day > 13:
|
selected_day = selected_day % 14
|
||||||
selected_day -= 14
|
|
||||||
while selected_day < 0:
|
|
||||||
selected_day += 14
|
|
||||||
|
|
||||||
if len(command) > 2:
|
if len(command) > 2:
|
||||||
for i in command[2:]:
|
for i in command[2:]:
|
||||||
|
|
Loading…
Reference in New Issue