-
Notifications
You must be signed in to change notification settings - Fork 3
Add Attendance Thread Creation and Reminders #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
||
const hackNightAttendanceThread = threads.threads | ||
.filter((t) => { | ||
return t.name.startsWith(""); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This matches all threads, is this intentional? If so probably can remove this filter haha
if (lastMessage) { | ||
const timeSent = lastMessage.createdAt; | ||
|
||
// If most recent message was sent more than 1.5 hours ago | ||
if ( | ||
new Date().getTime() - timeSent.getTime() > | ||
1.5 * 60 * 60 * 1000 | ||
) { | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dead code this does nothing
hackNightAttendanceThread.send({ | ||
content: `<@&${HACK_NIGHT_ATTENDANCE_ROLE_ID}>: Last attendance taken (or attendance reminder) was more than an hour and a half ago!`, | ||
}); | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be awaited methinks
.filter((t) => { | ||
return t.name.startsWith(""); | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as previous
if (lastMessage) { | ||
const timeSent = lastMessage.createdAt; | ||
|
||
// If most recent message was sent more than 1.5 hours ago | ||
if ( | ||
new Date().getTime() - timeSent.getTime() > | ||
1.5 * 60 * 60 * 1000 | ||
) { | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as previous
hackNightAttendanceThread.send({ | ||
content: `<@&${HACK_NIGHT_ATTENDANCE_ROLE_ID}>: Last attendance taken was more than an hour and a half ago!`, | ||
}); | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as previous
the thing ray wanted
not tested, test in prod
could never go wrong