-
Notifications
You must be signed in to change notification settings - Fork 18
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
automate year and alumni roles #331
Conversation
9f43ba4
to
a7d3438
Compare
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.
I left a few comments. To make the code a bit cleaner, when logging errors, can we do throw new Error('error message here')
instead, and can we remove the logging of non-errors?
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.
I left a few more comments. There are also some merge conflicts to be resolved.
97e8d1b
to
e54834f
Compare
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.
LGTM!
src/components/profile.ts
Outdated
const [customization, description] = Object.entries(data)[0]; | ||
|
||
if (customization === 'year') { | ||
// onlyDescription here would be the new year role |
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.
Replace onlyDescription
with description
?
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.
is there a way to set roles for everyone so far who has done a user profile?
await db.run(query, onlyDescription, userId); | ||
description.replace(/'/g, "''"); | ||
query = `UPDATE user_profile_table SET last_updated=CURRENT_DATE, ${customization}=? WHERE user_id=?`; | ||
await db.run(query, description, member.id); | ||
} else { |
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 else should be like... === 0 right?
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.
i guess we never have more than 1 tho
Summary of Changes
Motivation and Explanation
Related Issues
resolves #229
Steps to Reproduce
Demonstration of Changes
BEFORE:
MESSAGE SENT:
AFTER:
Further Information and Comments