add comments to all functions

This commit is contained in:
2024-06-10 11:40:03 +07:00
parent 14ad9f2b28
commit f3bfe0fa8c
4 changed files with 123 additions and 10 deletions
+14 -2
View File
@@ -78,7 +78,14 @@ async def command_the_day_after_tomorrow(msg: Message):
await timetable_for_day(msg, 2)
async def send_notification(bot):
async def send_notification(bot: Bot) -> None:
"""
Функция отправляющая уведомления по прошествию времени
:param bot: Bot - бот, с помощью которого можно отправлять сообщения
:return: None
"""
while True:
db = UseDB("users")
responses = db.find_document({})
@@ -90,7 +97,12 @@ async def send_notification(bot):
await asyncio.sleep(59)
async def update_data():
async def update_data() -> None:
"""
Функция базу каждый день в полночь
:return: None
"""
while True:
now = datetime.now()
next_midnight = (