diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-06-16 14:32:18 -0400 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-06-16 14:32:18 -0400 |
commit | 0e87bbd3940d89defcb04926587b35c8f4d1947f (patch) | |
tree | e50860d4dc25a11d4c3977b583284c4bcad1b077 /src/tasks/handleReminders.ts | |
parent | 661e4c9935aeb8760dafc7ced4bbec6cc356a033 (diff) | |
download | tanzanite-0e87bbd3940d89defcb04926587b35c8f4d1947f.tar.gz tanzanite-0e87bbd3940d89defcb04926587b35c8f4d1947f.tar.bz2 tanzanite-0e87bbd3940d89defcb04926587b35c8f4d1947f.zip |
remove util classes, move config out of src
Diffstat (limited to 'src/tasks/handleReminders.ts')
-rw-r--r-- | src/tasks/handleReminders.ts | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/tasks/handleReminders.ts b/src/tasks/handleReminders.ts index e281903..79693f5 100644 --- a/src/tasks/handleReminders.ts +++ b/src/tasks/handleReminders.ts @@ -1,4 +1,4 @@ -import { BushTask, Reminder, Time } from '#lib'; +import { BushTask, dateDelta, format, Reminder, Time } from '#lib'; const { Op } = (await import('sequelize')).default; export default class HandlerRemindersTask extends BushTask { @@ -9,7 +9,7 @@ export default class HandlerRemindersTask extends BushTask { }); } - public override async exec() { + public async exec() { const expiredEntries = await Reminder.findAll({ where: { expires: { @@ -26,9 +26,7 @@ export default class HandlerRemindersTask extends BushTask { void client.users .send( entry.user, - `The reminder you set ${util.dateDelta(entry.created)} ago has expired: ${util.format.bold(entry.content)}\n${ - entry.messageUrl - }` + `The reminder you set ${dateDelta(entry.created)} ago has expired: ${format.bold(entry.content)}\n${entry.messageUrl}` ) .catch(() => false); void entry.update({ notified: true }); |