Skip to content

Commit f4ad903

Browse files
authored
Merge pull request CloudBotIRC#284 from linuxdaemon/fix-remind-apology
Fix timeframe for apologizing about late reminders
2 parents 7934976 + fbde9ca commit f4ad903

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

plugins/remind.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
import asyncio
1515
import time
16-
from datetime import datetime
16+
from datetime import datetime, timedelta
1717

1818
from sqlalchemy import Table, Column, String, DateTime, PrimaryKeyConstraint
1919

@@ -108,8 +108,8 @@ def check_reminders(bot, async_call, db):
108108
conn.message(user, alert)
109109
conn.message(user, '"{}"'.format(message))
110110

111-
delta = (remind_time - added_time).seconds
112-
if delta > (30 * 60):
111+
delta = current_time - remind_time
112+
if delta > timedelta(minutes=30):
113113
late_time = time_since(remind_time, count=2)
114114
late = "(I'm sorry for delivering this message $(b){}$(clear) late," \
115115
" it seems I was unable to deliver it on time)".format(late_time)

0 commit comments

Comments
 (0)