diff --git a/.env.example b/.env.example deleted file mode 100644 index 235cd9e..0000000 --- a/.env.example +++ /dev/null @@ -1,3 +0,0 @@ -SLACK_SIGNING_SECRET="" -SLACK_BOT_TOKEN="" -SLACK_APP_TOKEN="" \ No newline at end of file diff --git a/app.js b/app.js index d627038..d6df2ca 100644 --- a/app.js +++ b/app.js @@ -103,6 +103,12 @@ app.action("faqs", async ({ ack, say }) => { await ack(); theActions.faqs(say); }); + + +app.action("newbie_advice", async({ack, say}) => { + await ack(); + theActions.newbie_advice(say); + }) //****************************************** */ // When a user joins the team, the bot sends a DM to the newcommer asking them how they would like to contribute diff --git a/components/actions/actionResponses.js b/components/actions/actionResponses.js index 7ce39b9..8a60fba 100644 --- a/components/actions/actionResponses.js +++ b/components/actions/actionResponses.js @@ -88,6 +88,14 @@ async function faqs(say) { ); } +async function newbie_advice(say) { + return await say( + `You clicked *New to Open Source ? Get Advice* \n + Welcome to the CHAOSS Community! Starting your journey in open source can be exciting and rewarding. To help you get started, we have a detailed guide just for newcomers. You can find it here:\n . \n + This guide provides tips, best practices, and encouragement to help you make meaningful contributions. Remember, every contribution, big or small, matters. We're here to support you every step of the way! 🎉` + ); +} + module.exports = { develop, joinMeet, @@ -98,4 +106,5 @@ module.exports = { regional_chapters, learn_something_else, faqs, + newbie_advice }; diff --git a/components/joinTeam.js b/components/joinTeam.js index 1f421ac..47f983b 100644 --- a/components/joinTeam.js +++ b/components/joinTeam.js @@ -8,9 +8,25 @@ async function joinTeamSlack(event, client, logger) { type: 'section', text: { type: 'mrkdwn', - text: `Welcome to *CHAOSS Community* <@${event.user.id}>! 🎉How would you like to get started? \n\nI want to..`, + text: `Welcome to *CHAOSS Community* <@${event.user.id}>! 🎉 How would you like to get started?`, }, }, + { + type: 'actions', + elements: [ + { + type: 'button', + text: { + type: 'plain_text', + text: 'New to Open Source? Get Advice', + emoji: true, + }, + style: 'primary', + value: 'newbie_advice', + action_id: 'newbie_advice' + }, + ], + }, { type: 'actions', elements: [ diff --git a/components/newbie.js b/components/newbie.js index c692650..ee24fc7 100644 --- a/components/newbie.js +++ b/components/newbie.js @@ -7,9 +7,25 @@ async function newHere(message, client, logger) { type: 'section', text: { type: 'mrkdwn', - text: `Welcome to *CHAOSS Community* <@${message.user}>! 🎉How would you like to get started? \n\nI want to..`, + text: `Welcome to *CHAOSS Community* <@${message.user}>! 🎉 How would you like to get started?`, }, }, + { + type: 'actions', + elements: [ + { + type: 'button', + text: { + type: 'plain_text', + text: 'New to Open Source? Get Advice', + emoji: true, + }, + style: 'primary', + value: 'newbie_advice', + action_id: 'newbie_advice' + }, + ], + }, { type: 'actions', elements: [