From d2dcfa582470fa5ea046968d41ad92a39cce50d6 Mon Sep 17 00:00:00 2001 From: Ethanell Date: Fri, 20 Sep 2019 11:45:10 +0000 Subject: [PATCH] Fix a stupidity I made with notifications and update .gitignore --- .gitignore | 12 +++++++++--- EDTuser.py | 4 ++-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 64e8956..f6ddfd9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,11 @@ +# Python __pycache__/ -edt.* -logs/ -token.ini venv/ + +# Logs +logs/ + +# Bot private +edt +edt.* +token.ini diff --git a/EDTuser.py b/EDTuser.py index 5e46755..397f9bf 100644 --- a/EDTuser.py +++ b/EDTuser.py @@ -28,8 +28,8 @@ class User: now = get_now() c = self.calendar(pass_week=False) for e in c.timeline: - if 0 <= (e.begin - now).total_seconds().__abs__() // 60 <= self.nt_time and \ - 0 <= (now - self.nt_last).total_seconds() // 60 >= self.nt_cooldown: + if 0 < (e.begin - now).total_seconds() // 60 <= self.nt_time and \ + 0 < (now - self.nt_last).total_seconds() // 60 >= self.nt_cooldown: self.nt_last = get_now() return e return None