Skip to content

Commit

Permalink
Add toriel invite details to /airtable command
Browse files Browse the repository at this point in the history
  • Loading branch information
maxwofford committed Apr 11, 2022
1 parent 8938018 commit 918629a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/interactions/airtable.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ export default async (bot, message) => {
if (info.address && info.address.id) {
results.addressAirtableRecord = `<https://airtable.com/tblbcZKrj9gFPzj1l/${info.address.id}?blocks=hide|Address record>`
}
if (info.torielInvite) {
results.torielInvite = true
}
if (info.leaderV2) {
results.leaderV2Record = `<https://airtable.com/tblF84agXEjAX9pOh/${info.leaderV2.id}?blocks=hide|Leader V2 record>`
results.leaderV2Status = info.leaderV2.fields['Status']
Expand Down
5 changes: 4 additions & 1 deletion src/utils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,10 @@ export const getInfoForUser = user =>
}),
airFind('Club Leaders', 'Slack ID', user, { base: 'clubsV2' }).then(leaderV2 => {
results.leaderV2 = leaderV2
})
}),
// @msw: see hackclub/toriel for usage
// https://github.com/hackclub/toriel/commit/d0e79852a0f200d8cae58bc3da6e1d0ae68ad946
fetch(`https://toriel.hackclub.com/slack-tutorial/${user}`).then(r => r.json()).then(r => results.torielInvite = r.invite),
])
.then(async () => {
if (!results.person && results.slackUser) {
Expand Down

0 comments on commit 918629a

Please sign in to comment.