Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite the /remindme command #541

Merged
merged 8 commits into from
Sep 21, 2024
Merged

Rewrite the /remindme command #541

merged 8 commits into from
Sep 21, 2024

Conversation

wlinator
Copy link
Member

@wlinator wlinator commented Sep 10, 2024

Description

In this PR, the /remindme command is fully rewritten. A Task checks for unsent reminders every 5 minutes and attempts to send them in this order:

  • The target's DM
  • If that fails, the channel the command was invoked in

A remindme is always marked as sent if an attempt is made, regardless of whether it succeeded. Such attempt can only fail if the target's DMs are closed and the invoke channel was deleted or perms were changed to deny Tux send_messages access.

Summary by Sourcery

Rewrite the /remindme command to use a periodic task for checking and sending unsent reminders, enhancing the reliability and efficiency of the reminder system.

New Features:

  • Introduce a periodic task that checks for unsent reminders every 5 minutes and attempts to send them to the user's DM or the channel where the command was invoked.

Enhancements:

  • Refactor the /remindme command to improve the reminder sending logic and handling of unsent reminders.

This comment was marked as duplicate.

sourcery-ai[bot]

This comment was marked as resolved.

@kzndotsh kzndotsh self-assigned this Sep 21, 2024
…handle exceptions and prevent app crash

feat(remindme.py): add logging of errors when sending reminders fails to improve error tracking and debugging
@kzndotsh kzndotsh merged commit 7b07a2e into main Sep 21, 2024
8 checks passed
@kzndotsh kzndotsh deleted the tess-remindme-rewrite branch September 21, 2024 04:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants