Implement Feature: Inactive User Notification System
Objective
Develop a system to notify users who have not interacted with the Telegram Bot for an extended period of time.
Description
The aim of this task is to implement a feature in the pysyun_conversation_flow library that schedules regular checks for user activity. If a user has not communicated with the bot for a specific duration, a reminder message should be sent to them.
Requirements
Scheduler Library:
Use one of the Python scheduler libraries (e.g., schedule, APScheduler, Celery).
Check Interval:
The scheduler should run every 30 minutes to perform the following checks.
User Iteration:
Iterate over the complete list of users who have ever communicated with the Telegram Bot.
Activity Check:
Check if there have been any messages from the given user within the specified period (define what "too long" means, e.g., 24 hours, 7 days, etc.).
Notification:
Send a reminder message to users who have not communicated for the defined period.
Implementation Steps
Scheduler Setup:
Integrate a Python scheduler library into the project.
Configure the scheduler to run every 30 minutes.
Database Interaction:
Retrieve the list of users who have communicated with the bot.
Fetch the timestamp of the last message from each user.
Activity Verification:
Compare the current time with the last message timestamp to determine inactivity.
Notification Sending:
Send a predefined message to users identified as inactive.
Technical Stack
Programming Language: Python
Scheduler Library: schedule, APScheduler, or Celery (Choose one)
Messaging: Telegram Bot API
Database: As used in the pysyun_conversation_flow project (the default Telegram Bot serializer is used, which is quite enough).
Contributing
Contributions are welcome! Check out the issues section of the repository to see what tasks need attention. Feel free to assign yourself an issue or open a new one for a feature or bug you want to work on. Make sure to discuss your approach with the maintainers before starting the implementation.
Implement Feature: Inactive User Notification System
Objective
Develop a system to notify users who have not interacted with the Telegram Bot for an extended period of time.
Description
The aim of this task is to implement a feature in the
pysyun_conversation_flow
library that schedules regular checks for user activity. If a user has not communicated with the bot for a specific duration, a reminder message should be sent to them.Requirements
Scheduler Library:
schedule
,APScheduler
,Celery
).Check Interval:
User Iteration:
Activity Check:
Notification:
Implementation Steps
Scheduler Setup:
Database Interaction:
Activity Verification:
Notification Sending:
Technical Stack
schedule
,APScheduler
, orCelery
(Choose one)pysyun_conversation_flow
project (the default Telegram Bot serializer is used, which is quite enough).Contributing
Contributions are welcome! Check out the issues section of the repository to see what tasks need attention. Feel free to assign yourself an issue or open a new one for a feature or bug you want to work on. Make sure to discuss your approach with the maintainers before starting the implementation.
Submission