Skip to content

Commit

Permalink
Merge pull request #74 from Omokiti/add_faq
Browse files Browse the repository at this point in the history
Add faq
  • Loading branch information
misspee007 authored Aug 31, 2023
2 parents ec8d550 + 7219429 commit d92f88d
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 1 deletion.
4 changes: 4 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ app.action('learn_something_else', async ({ ack, say }) => {
theActions.learn_something_else(say);
});

app.action('faqs', async ({ ack, say }) => {
await ack();
theActions.faqs(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
12 changes: 11 additions & 1 deletion components/actions/actionResponses.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,16 @@ async function implement_metrics(say) {
async function learn_something_else(say) {
return await say(
`You clicked *Learn About Something Else*\n
We encourage you to read through our Community Handbook: https://handbook.chaoss.community/, and if you still can't find what you're looking for, feel free to ask your question in our #newcomers slack channel.`
We encourage you to read through our Community Handbook: https://handbook.chaoss.community/, and if you still can't find what you're looking for, feel free to ask your question in our <#C0207C3RETX> slack channel.`

);
}

async function faqs(say) {
return await say(
`You clicked *FAQs*\n
We encourage you to read through our Frequently Asked Questions: https://handbook.chaoss.community/community-handbook/about/general-faq, and if you still can't find what you're looking for, feel free to ask your question in our <#C0207C3RETX> slack channel.`

);
}

Expand All @@ -59,4 +68,5 @@ module.exports = {
helpWithWebsite,
implement_metrics,
learn_something_else,
faqs
};
16 changes: 16 additions & 0 deletions components/joinTeam.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,22 @@ async function joinTeamSlack(event, client, logger) {
},
],
},
{
type: 'actions',
elements: [
{
type: 'button',
text: {
type: 'plain_text',
text: 'Go through the FAQs',
emoji: true,
},
style: 'primary',
value: 'faqs',
action_id: 'faqs',
},
],
},
],
text: `Welcome to the team, <@${event.user.id}>! 🎉.`,
});
Expand Down
16 changes: 16 additions & 0 deletions components/newbie.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,22 @@ async function newHere(message, client, logger) {
},
],
},
{
type: 'actions',
elements: [
{
type: 'button',
text: {
type: 'plain_text',
text: 'Go through the FAQs',
emoji: true,
},
style: 'primary',
value: 'faqs',
action_id: 'faqs',
},
],
},
],
text: `Welcome to the team, <@${message.user}>! 🎉.`,
});
Expand Down

0 comments on commit d92f88d

Please sign in to comment.