1
0
Fork 0

Fix a stupidity I made with notifications and update .gitignore

This commit is contained in:
Ethanell 2019-09-20 11:45:10 +00:00
parent b98654a09e
commit d2dcfa5824
2 changed files with 11 additions and 5 deletions

12
.gitignore vendored
View file

@ -1,5 +1,11 @@
# Python
__pycache__/ __pycache__/
edt.*
logs/
token.ini
venv/ venv/
# Logs
logs/
# Bot private
edt
edt.*
token.ini

View file

@ -28,8 +28,8 @@ class User:
now = get_now() now = get_now()
c = self.calendar(pass_week=False) c = self.calendar(pass_week=False)
for e in c.timeline: for e in c.timeline:
if 0 <= (e.begin - now).total_seconds().__abs__() // 60 <= self.nt_time and \ if 0 < (e.begin - now).total_seconds() // 60 <= self.nt_time and \
0 <= (now - self.nt_last).total_seconds() // 60 >= self.nt_cooldown: 0 < (now - self.nt_last).total_seconds() // 60 >= self.nt_cooldown:
self.nt_last = get_now() self.nt_last = get_now()
return e return e
return None return None