updated the regex
This commit is contained in:
parent
4d60c12d17
commit
4dcef3f841
|
@ -28,7 +28,11 @@ class MessageHandler:
|
||||||
bot.test_commands = self.test_commands
|
bot.test_commands = self.test_commands
|
||||||
|
|
||||||
# Regex for detecting "in X time" patterns
|
# Regex for detecting "in X time" patterns
|
||||||
self.time_pattern = re.compile(r'in\s+(\d+\s+(?:hour|hours|minute|minutes|day|days|second|seconds)s?)', re.IGNORECASE)
|
self.time_pattern = re.compile(
|
||||||
|
r'in\s+((?:\d+\s*(?:seconds?|minutes?|hours?|days?|s|m|h|d)\s*)+)',
|
||||||
|
re.IGNORECASE
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def parse_relative_time(self, time_str):
|
def parse_relative_time(self, time_str):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in a new issue