Skip to content

Commit b126a69

Browse files
Will Beddowironman5366
Will Beddow
authored andcommitted
🔧 Reminder optimization
1 parent f73d3c1 commit b126a69

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

core/plugins/reminder.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ def is_reminder(event):
2727
else:
2828
return False
2929

30-
3130
@subscribe({"name": "reminder", "check": is_reminder})
3231
def main(event):
3332
'''Set a reminder using the interface scheduler'''
@@ -64,6 +63,9 @@ def main(event):
6463
lefts = [left.orth_ for left in chunk.lefts]
6564
rights = [right.orth_ for right in chunk.rights]
6665
event_time = " ".join(lefts + [chunk.text] + rights)
66+
#Break out of the loop so the event time is the first matching word
67+
if time_message:
68+
break
6769
if not time_message:
6870
time_message == "Reminder: {0}".format(event_command)
6971
if not event_time:

0 commit comments

Comments
 (0)