filter
This commit is contained in:
parent
c525c42487
commit
0ac2b90487
3
bot.py
3
bot.py
|
@ -1329,6 +1329,7 @@ def set_timezone(message: telebot.types.Message):
|
|||
|
||||
|
||||
def get_hours() -> tuple:
|
||||
# TODO command to set range
|
||||
return (8, 20)
|
||||
|
||||
|
||||
|
@ -1397,7 +1398,7 @@ def stack_update(forum: int, force_reset: bool = False) -> None:
|
|||
def clean_old_dates(date: dt.datetime, array: str) -> None:
|
||||
"Removes dates from db's array which are older than `date`."
|
||||
a = db.read(array)
|
||||
a = a.filter(lambda x: x >= date, a)
|
||||
a = filter(lambda x: x >= date, a)
|
||||
db.write(array, a)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue