aboutsummaryrefslogtreecommitdiff
path: root/src/tasks/handleReminders.ts
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-06-16 14:32:18 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-06-16 14:32:18 -0400
commit0e87bbd3940d89defcb04926587b35c8f4d1947f (patch)
treee50860d4dc25a11d4c3977b583284c4bcad1b077 /src/tasks/handleReminders.ts
parent661e4c9935aeb8760dafc7ced4bbec6cc356a033 (diff)
downloadtanzanite-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.ts8
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 });