From 6988daccf219d3992cdb906358dda336944dbc2a Mon Sep 17 00:00:00 2001 From: Interitio Date: Tue, 24 Jun 2025 17:33:06 +1000 Subject: [PATCH] feat: Primitive 'remindme at' support. --- src/modules/twreminders/cog.py | 68 ++++++++++++++++++++++++++-------- 1 file changed, 52 insertions(+), 16 deletions(-) diff --git a/src/modules/twreminders/cog.py b/src/modules/twreminders/cog.py index 6dfa0995..53a98b53 100644 --- a/src/modules/twreminders/cog.py +++ b/src/modules/twreminders/cog.py @@ -6,6 +6,8 @@ from typing import Optional from dataclasses import dataclass from collections import defaultdict +from dateutil.parser import ParserError, parse + import twitchio from twitchio.ext import commands import datetime as dt @@ -18,9 +20,10 @@ from . import logger reminder_regex = re.compile( r""" - (^)?(?P (?: \b in) | (?: every)) - \s*(?P (?: day| hour| (?:\d+\s*(?:(?:d|h|m|s)[a-zA-Z]*)?(?:\s|and)*)+)) - (?:(?(1) (?:, | ; | : | \. | to)? | $)) + (^)?(?P (?: \b in) | (?: every) | (?P at)) + \s* + (?(at) (?P