scheduler ========= .. py:module:: scheduler Attributes ---------- .. autoapisummary:: scheduler.logger scheduler.API_TOKEN scheduler.BOT_USERNAME scheduler.WAITING_TIME scheduler.bot Functions --------- .. autoapisummary:: scheduler.send_daily_message scheduler.run_schedule Module Contents --------------- .. py:data:: logger Logger for the scheduler service module .. py:data:: API_TOKEN The API token for the Telegram bot, retrieved from the configuration file. .. py:data:: BOT_USERNAME The username of the Telegram bot, retrieved from the configuration file. .. py:data:: WAITING_TIME :value: 8 The default waiting time (in minutes) before sending the next reminder. .. py:data:: bot The Telegram bot object used to send messages and interact with users. .. py:function:: send_daily_message(user_id: int, username: str, verif_time: datetime.datetime.time, description: str) -> telegram.Message :async: Sends a daily scheduled message to the user, prompting them to confirm their status. :param user_id: The Telegram user ID to send the message to. :type user_id: int :param username: The username of the user for logging purposes. :type username: str :param verif_time: The scheduled time for the verification message. :type verif_time: datetime.time :param description: A description associated with the daily message. :type description: str :returns: The Telegram message object representing the sent daily message. :rtype: Message .. py:function:: run_schedule() -> None :async: Runs the main scheduling loop, sending daily messages at the specified time for each user. This function checks the current time every minute and sends messages to users when their scheduled verification time matches the current time. If the verification is skipped or marked as a fast-check, it updates the user's status accordingly.