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

!question: Use accessible link text label and unify contents with slash variant #636

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
10 changes: 5 additions & 5 deletions botCommands/__snapshots__/question-legacy.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ exports[`!question callback returns correct output 1`] = `
{
"color": 13407555,
"description": "
Asking context-rich questions makes it easy to receive help, and makes it easy for others to help you quickly! Great engineers ask great questions, and the prompt below is an invitation to improve your skills and set yourself up for success in the workplace.
Asking context-rich questions makes it easy to receive help, and makes it easy for others to help you quickly! Great engineers ask great questions, and the prompt below is an invitation to improve your skills and set yourself up for success in the workplace.

**Project/Exercise:**
**Lesson link:**
**Code:** [code sandbox like replit or codepen]
**Issue/Problem:** [screenshots if applicable]
**What I expected:**
**What I've tried:**
**What I expected:**
**What I've tried:**

For even more context around on how to hone your question-asking skills, give this a read: https://www.theodinproject.com/guides/community/how_to_ask
",
For more information, read our [guide on honing your question-asking skills](<https://www.theodinproject.com/guides/community/how_to_ask>).
",
"title": "Asking Great Questions",
},
],
Expand Down
20 changes: 6 additions & 14 deletions botCommands/question-legacy.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,16 @@
const Discord = require('discord.js');
const { registerBotCommand } = require('../botEngine');
const commandsContent = require('../lib/commandsContent');

const { color, title, description } = commandsContent.question;

const question = {
regex: /(?<!\S)!question(?!\S)/,
cb: () => {
const questionEmbed = new Discord.EmbedBuilder()
.setColor('#cc9543')
.setTitle('Asking Great Questions')
.setDescription(`
Asking context-rich questions makes it easy to receive help, and makes it easy for others to help you quickly! Great engineers ask great questions, and the prompt below is an invitation to improve your skills and set yourself up for success in the workplace.

**Project/Exercise:**
**Lesson link:**
**Code:** [code sandbox like replit or codepen]
**Issue/Problem:** [screenshots if applicable]
**What I expected:**
**What I've tried:**

For even more context around on how to hone your question-asking skills, give this a read: https://www.theodinproject.com/guides/community/how_to_ask
`);
.setColor(color)
.setTitle(title)
.setDescription(description);

return { embeds: [questionEmbed] };
},
Expand Down
2 changes: 1 addition & 1 deletion lib/commandsContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Asking context-rich questions makes it easy to receive help, and makes it easy f
**What I expected:**
**What I've tried:**

For even more context around on how to hone your question-asking skills, give this a read: https://www.theodinproject.com/guides/community/how_to_ask
For more information, read our [guide on honing your question-asking skills](<https://www.theodinproject.com/guides/community/how_to_ask>).
`,
},
top: {
Expand Down