Fix a stupidity I made with notifications and update .gitignore
This commit is contained in:
parent
b98654a09e
commit
d2dcfa5824
2 changed files with 11 additions and 5 deletions
12
.gitignore
vendored
12
.gitignore
vendored
|
@ -1,5 +1,11 @@
|
||||||
|
# Python
|
||||||
__pycache__/
|
__pycache__/
|
||||||
edt.*
|
|
||||||
logs/
|
|
||||||
token.ini
|
|
||||||
venv/
|
venv/
|
||||||
|
|
||||||
|
# Logs
|
||||||
|
logs/
|
||||||
|
|
||||||
|
# Bot private
|
||||||
|
edt
|
||||||
|
edt.*
|
||||||
|
token.ini
|
||||||
|
|
|
@ -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
|
||||||
|
|
Reference in a new issue