Skip to content

Commit

Permalink
Added the Newbie Advice Button (#126)
Browse files Browse the repository at this point in the history
* Added the Newbie Advice Button (#125)

Signed-off-by: codexkunal <[email protected]>

* Update text in joinTeam.js

Signed-off-by: Precious Abubakar <[email protected]>

* Update greeting in newbie.js

Removes "I want to.." because it doesn't fit the newcomer advice button

Signed-off-by: Precious Abubakar <[email protected]>
  • Loading branch information
misspee007 authored Jan 8, 2025
1 parent 833c022 commit 89e90dc
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 5 deletions.
3 changes: 0 additions & 3 deletions .env.example

This file was deleted.

6 changes: 6 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 9 additions & 0 deletions components/actions/actionResponses.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://github.com/chaoss/community/blob/main/advice_to_newcomers.md>. \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,
Expand All @@ -98,4 +106,5 @@ module.exports = {
regional_chapters,
learn_something_else,
faqs,
newbie_advice
};
18 changes: 17 additions & 1 deletion components/joinTeam.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
Expand Down
18 changes: 17 additions & 1 deletion components/newbie.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
Expand Down

0 comments on commit 89e90dc

Please sign in to comment.