Send guidance email to invited users already in Slack #307
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #306
Frequently, users sign up on hackclub.com/slack without knowing they already have an account from Arcade, High Seas or just a long time ago. This PR will send them an email telling them how to login to Slack. This should provide a better experience for them, and cut down on the amount of emails sent to slack (at) hackclub (dot) com.
If they're an MCG, TORIEL will make sure that they're in the cave channel and link it in the email.
This PR has several requirements before being merged.
New Slack Scopes
User Token Scopes
channels:write.invites- Used to invite MCGs to the cave channelNew environment variables
LOOPS_API_KEY- Self explanatory. An API key for sending transactional emails.LOOPS_MCG_TRANSACTIONAL_ID- The ID of the transaction email to be sent to MCGsLOOPS_FULL_USER_TRANSACTIONAL_ID- The ID of the transaction email to be sent to full usersSLACK_USER_TOKEN- From the Slack OAuth & Permissions dashboard.