-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6cb7667
commit 99e76cc
Showing
4 changed files
with
100 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
const figlet = require("figlet") | ||
module.exports = { | ||
title: "Upcoming Events", | ||
action_id: "hardware_btn", | ||
description: "Channels featured by Hack Club", | ||
/** | ||
* @param {{app: import('@slack/bolt').App}} param1 | ||
*/ | ||
render: async function ({ app }) { | ||
const events = (await (await fetch("https://hackathons.hackclub.com/api/events/upcoming")).json()) | ||
var text = "" | ||
events.forEach(event => { | ||
text += `<${event.website}|${event.name}> (${!event.virtual ? event.hybrid ? "Hybrid" : "In person" : "Virtual" }) - ${event.city || "Unknown city"}, ${event.state || "Unknown area"}, ${event.country || event.countryCode, "Unknown country"}\n` | ||
}) | ||
return `\`\`\` | ||
${figlet.textSync("Events", { | ||
horizontalLayout: "default", | ||
verticalLayout: "default", | ||
width: 60, | ||
whitespaceBreak: true, | ||
})} | ||
\`\`\` | ||
Here are a list of upcoming Hackathons: | ||
${text}` | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
const figlet = require("figlet") | ||
module.exports = { | ||
title: "Hardware", | ||
action_id: "hardware_btn", | ||
description: "Channels featured by Hack Club", | ||
/** | ||
* @param {{app: import('@slack/bolt').App}} param1 | ||
*/ | ||
render: async function ({ app }) { | ||
return `\`\`\` | ||
${figlet.textSync("Hardware", { | ||
horizontalLayout: "default", | ||
verticalLayout: "default", | ||
width: 60, | ||
whitespaceBreak: true, | ||
})} | ||
\`\`\` | ||
Hack Club has started the process of getting teenagers into more hardware-based projects! | ||
Trail: 30 Hack Clubbers build PCBs that will be useful on the trail and hike for 7 days on the Pacific Crest Trail from July 12th to July 19th. Travel stipends/aid available to help you go. Learn more at https://trail.hackclub.com (<#C06RQ9TTEG3>) | ||
OnBoard: Get $100 to build your own custom PCB. Learn more at https://hackclub.com/onboard (<#C056AMWSFKJ>) | ||
Bin: Get a free custom hardware kit made for you shipped to your doorstep. Learn more at https://hackclub.com/bin (<#C056AMWSFKJ>) | ||
All of these events and programs are *free* for you to attend.` | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters