Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added the Newbie Advice Button #125

Merged
merged 1 commit into from
Jan 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
};
16 changes: 16 additions & 0 deletions components/joinTeam.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,22 @@ async function joinTeamSlack(event, client, logger) {
text: `Welcome to *CHAOSS Community* <@${event.user.id}>! 🎉How would you like to get started? \n\nI want to..`,
},
},
{
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
16 changes: 16 additions & 0 deletions components/newbie.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,22 @@ async function newHere(message, client, logger) {
text: `Welcome to *CHAOSS Community* <@${message.user}>! 🎉How would you like to get started? \n\nI want to..`,
},
},
{
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