From a56cd2ce89152d4b5731a944052c94a0a89895a2 Mon Sep 17 00:00:00 2001 From: TigerAttack302 Date: Mon, 13 Oct 2025 13:19:13 -0400 Subject: [PATCH 1/7] genQuestions added --- src/commands/jobs/interview.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/commands/jobs/interview.ts diff --git a/src/commands/jobs/interview.ts b/src/commands/jobs/interview.ts new file mode 100644 index 00000000..1ee583c0 --- /dev/null +++ b/src/commands/jobs/interview.ts @@ -0,0 +1,17 @@ +// General Behavioral Questions +const genQuestions: string[] = [ + 'Tell me about a challenge you faced and how you overcame it.', + 'How do you handle working under pressure?', + 'Describe a mistake you’ve made and what you learned from it.', + 'Tell me about a time you set and achieved a meaningful goal.', + 'Describe a decision you made that others disagreed with. How did you handle it?', + 'Do you prefer working independently or in a team? Provide an example.', + 'What do you do when your opinion conflicts with someone else’s?', + 'Tell me about a time you motivated or supported a teammate.', + 'Describe a time you had to adapt quickly to change.', + 'How do you handle receiving constructive criticism?', + 'Tell me about a time when your initiative improved a process or outcome.', + 'Describe how you stay organized when balancing multiple tasks.', + 'Tell me about a time you showed leadership without having a formal title.' +]; + From 9dec423e2f6728a3c28951056d1c608b312cf107 Mon Sep 17 00:00:00 2001 From: TigerAttack302 Date: Mon, 13 Oct 2025 13:31:09 -0400 Subject: [PATCH 2/7] Added more job-tailored interview questions --- src/commands/jobs/interview.ts | 68 +++++++++++++++++++++++++++++++++- 1 file changed, 67 insertions(+), 1 deletion(-) diff --git a/src/commands/jobs/interview.ts b/src/commands/jobs/interview.ts index 1ee583c0..29e4108c 100644 --- a/src/commands/jobs/interview.ts +++ b/src/commands/jobs/interview.ts @@ -1,4 +1,4 @@ -// General Behavioral Questions +// General interview questions const genQuestions: string[] = [ 'Tell me about a challenge you faced and how you overcame it.', 'How do you handle working under pressure?', @@ -15,3 +15,69 @@ const genQuestions: string[] = [ 'Tell me about a time you showed leadership without having a formal title.' ]; +// The following are all interview questions tailored to specific job roles +const softwareDevEng: string[] = [ + 'Describe a particularly difficult technical problem you faced and how you resolved it.', + 'Tell me about a project where you had to quickly learn a new technology or framework.', + 'Describe how you handled finding a major bug right before a release.', + 'Give an example of a time you worked under a tight deadline. How did you manage your time?', + 'Tell me about a time you collaborated with others to solve a complex technical issue.', + 'Explain a time you had to simplify a complex idea for someone less technical.', + 'Describe a situation where you had to balance writing clean code with meeting performance requirements.', + 'Tell me about a time you disagreed with a teammate on implementation strategy. How was it resolved?', + 'What’s an example of when you went beyond the requirements to improve a product or feature?', + 'Describe a time you received critical feedback on your code. How did you respond?', + 'Tell me about a time you identified an inefficiency in a process and improved it.' +]; + +const sysAdmin: string[] = [ + 'Tell me about a time you diagnosed and resolved a critical system outage.', + 'Describe a situation where you automated a repetitive task to improve efficiency.', + 'Give an example of when you had to communicate a technical issue to non-technical staff.', + 'Describe a time you handled multiple urgent tickets at once. How did you prioritize?', + 'Tell me about a mistake you made in system configuration and how you fixed it.', + 'Describe a time you improved system reliability or uptime.', + 'Tell me about a time you proposed or implemented a security enhancement.', + 'Describe a challenging incident involving data loss or backup recovery.', + 'How have you handled implementing a major infrastructure upgrade with minimal downtime?', + 'Give an example of how you’ve ensured compliance with IT security policies.' +]; + +const dataScientist: string[] = [ + 'Tell me about a time you used data to influence a major decision.', + 'Describe a project where you had to work with incomplete or messy data.', + 'Explain a time when your analysis revealed something unexpected. What did you do?', + 'Tell me about a model or algorithm you developed and how you validated it.', + 'Describe how you balanced statistical accuracy with practical constraints.', + 'Give an example of explaining complex data insights to a non-technical audience.', + 'Describe how you’ve collaborated with engineers or business stakeholders to deliver a data product.', + 'Tell me about a time your findings were challenged. How did you defend or revise your analysis?', + 'Explain how you’ve ensured data quality or integrity in your work.', + 'Tell me about a time you had to choose between multiple analytical approaches.' +]; + +const uxuiDesigner: string[] = [ + 'Describe a challenging design problem you solved and your approach.', + 'Tell me about a time you balanced user needs with business goals.', + 'Give an example of how you handled negative feedback on your design.', + 'Describe a time you had to advocate for the user experience in a product meeting.', + 'Tell me about a project where you collaborated closely with developers.', + 'Describe a time you adapted your design process to meet tight deadlines.', + 'Tell me about a design decision that didn’t go as planned. What did you learn?', + 'Give an example of how user testing influenced your final design.', + 'Tell me about a time you had to compromise on your design vision.', + 'Describe how you stay updated on design trends and tools.' +]; + +const projManager: string[] = [ + 'Tell me about a project that went off track and how you got it back under control.', + 'Describe a time you had to manage conflicting stakeholder priorities.', + 'Give an example of how you motivated your team during a challenging phase.', + 'Tell me about a project where you had to deliver results under significant constraints.', + 'Describe how you handled a disagreement between team members.', + 'Explain how you adapted to a major scope change late in a project.', + 'Tell me about a time you had to make a difficult trade-off between quality, cost, and speed.', + 'Describe a situation where you had to communicate bad news to stakeholders.', + 'Tell me about a project you’re most proud of and why.', + 'Give an example of how you’ve built trust within a new or distributed team.' +]; From e2a2e65c6497299aa28679d132a35d63e4c61ec6 Mon Sep 17 00:00:00 2001 From: ViaBouvier Date: Mon, 13 Oct 2025 14:13:01 -0400 Subject: [PATCH 3/7] Added beginnings of /interview command --- src/commands/jobs/interview.ts | 54 ++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 src/commands/jobs/interview.ts diff --git a/src/commands/jobs/interview.ts b/src/commands/jobs/interview.ts new file mode 100644 index 00000000..dfdad0fb --- /dev/null +++ b/src/commands/jobs/interview.ts @@ -0,0 +1,54 @@ +import { + ActionRowBuilder, + StringSelectMenuBuilder, + ChatInputCommandInteraction, + InteractionResponse +} from 'discord.js'; +import { Command } from '@lib/types/Command'; +// import { setTimeout } from 'timers'; + +export default class extends Command { + + description = 'Practice answering common interview questions for a particular job role.'; + + async run( + interaction: ChatInputCommandInteraction + ): Promise | void> { + const jobOptions = [ + { + label: 'Software Engineer', + value: 'software_engineer' + }, + { + label: 'Systems Administrator', + value: 'systems_administrator' + }, + { + label: 'Data Scientist', + value: 'data_scientist' + }, + { + label: 'UI/UX Designer', + value: 'ui_ux_designer' + }, + { + label: 'IT Project Manager', + value: 'it_project_manager' + } + ]; + + const selectMenu = new StringSelectMenuBuilder() + .setCustomId('interview_job_select') + .setPlaceholder('Select a job role...') + .addOptions(jobOptions); + + const row = new ActionRowBuilder().addComponents(selectMenu); + + return interaction.reply({ + content: + 'Choose a job role to practice interview questions:', + components: [row] + }); + } + +} From 76dad8e3dbfa488357fbe75b9773367e4b4dd757 Mon Sep 17 00:00:00 2001 From: ViaBouvier Date: Mon, 13 Oct 2025 14:17:51 -0400 Subject: [PATCH 4/7] fixed typo --- src/commands/jobs/interview.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/jobs/interview.ts b/src/commands/jobs/interview.ts index dfdad0fb..543baf3d 100644 --- a/src/commands/jobs/interview.ts +++ b/src/commands/jobs/interview.ts @@ -46,7 +46,7 @@ export default class extends Command { return interaction.reply({ content: - 'Choose a job role to practice interview questions:', + 'Choose a job role to practice interview questions:', components: [row] }); } From 7d1435bdb606edd872f3175d80c46c9f09682187 Mon Sep 17 00:00:00 2001 From: ViaBouvier Date: Mon, 13 Oct 2025 15:37:20 -0400 Subject: [PATCH 5/7] /interview command now DMs the user --- src/commands/jobs/interview.ts | 16 ++++++++++++++-- src/pieces/interactionHandler.ts | 7 ++++++- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/src/commands/jobs/interview.ts b/src/commands/jobs/interview.ts index 543baf3d..f0a0feb6 100644 --- a/src/commands/jobs/interview.ts +++ b/src/commands/jobs/interview.ts @@ -2,7 +2,8 @@ import { ActionRowBuilder, StringSelectMenuBuilder, ChatInputCommandInteraction, - InteractionResponse + InteractionResponse, + StringSelectMenuInteraction } from 'discord.js'; import { Command } from '@lib/types/Command'; // import { setTimeout } from 'timers'; @@ -44,11 +45,22 @@ export default class extends Command { const row = new ActionRowBuilder().addComponents(selectMenu); - return interaction.reply({ + await interaction.reply({ content: 'Choose a job role to practice interview questions:', components: [row] }); + + return; } } + +export async function handleInterviewOptionSelect(i: StringSelectMenuInteraction): Promise { + try { + await i.user.send('Here is where the interview will take place.'); + await i.reply({ content: 'Check your DMs for the interview', ephemeral: true }); + } catch (err) { + await i.reply({ content: "I couldn't DM you. Please check your privacy settings.", ephemeral: true }); + } +} diff --git a/src/pieces/interactionHandler.ts b/src/pieces/interactionHandler.ts index 16c24107..a11be42f 100644 --- a/src/pieces/interactionHandler.ts +++ b/src/pieces/interactionHandler.ts @@ -1,6 +1,7 @@ -import { ButtonInteraction, Client, MessageComponentInteraction } from 'discord.js'; +import { ButtonInteraction, Client, MessageComponentInteraction, StringSelectMenuInteraction } from 'discord.js'; import { handleRpsOptionSelect } from '../commands/fun/rockpaperscissors'; import { handlePollOptionSelect } from '../commands/fun/poll'; +import { handleInterviewOptionSelect } from '../commands/jobs/interview'; import { SageInteractionType } from '@lib/types/InteractionType'; async function register(bot: Client): Promise { @@ -11,6 +12,7 @@ async function register(bot: Client): Promise { async function routeComponentInteraction(bot: Client, i: MessageComponentInteraction) { if (i.isButton()) handleBtnPress(bot, i); + if (i.isStringSelectMenu()) handleStringSelectMenu(bot, i); } export default register; @@ -24,3 +26,6 @@ function handleBtnPress(bot: Client, i: ButtonInteraction) { break; } } +function handleStringSelectMenu(bot: Client, i: StringSelectMenuInteraction) { + handleInterviewOptionSelect(i); +} From 256f6ea85b073d846243355dc7d3e425db5e047b Mon Sep 17 00:00:00 2001 From: ViaBouvier Date: Wed, 5 Nov 2025 13:32:51 -0500 Subject: [PATCH 6/7] minor changes to /interview --- src/commands/jobs/interview.ts | 298 +++++++++++++++++++++------------ src/commands/jobs/jobform.ts | 2 + 2 files changed, 194 insertions(+), 106 deletions(-) diff --git a/src/commands/jobs/interview.ts b/src/commands/jobs/interview.ts index 368faa95..659f3546 100644 --- a/src/commands/jobs/interview.ts +++ b/src/commands/jobs/interview.ts @@ -3,147 +3,233 @@ import { StringSelectMenuBuilder, ChatInputCommandInteraction, InteractionResponse, - StringSelectMenuInteraction -} from 'discord.js'; -import { Command } from '@lib/types/Command'; + StringSelectMenuInteraction, +} from "discord.js"; +import { Command } from "@lib/types/Command"; // import { setTimeout } from 'timers'; -export default class extends Command { +// General interview questions +const genQuestions: string[] = [ + "Tell me about a challenge you faced and how you overcame it.", + "How do you handle working under pressure?", + "Describe a mistake you’ve made and what you learned from it.", + "Tell me about a time you set and achieved a meaningful goal.", + "Describe a decision you made that others disagreed with. How did you handle it?", + "Do you prefer working independently or in a team? Provide an example.", + "What do you do when your opinion conflicts with someone else’s?", + "Tell me about a time you motivated or supported a teammate.", + "Describe a time you had to adapt quickly to change.", + "How do you handle receiving constructive criticism?", + "Tell me about a time when your initiative improved a process or outcome.", + "Describe how you stay organized when balancing multiple tasks.", + "Tell me about a time you showed leadership without having a formal title.", +]; + +// The following are all interview questions tailored to specific job roles +const softwareDevEng: string[] = [ + "Describe a particularly difficult technical problem you faced and how you resolved it.", + "Tell me about a project where you had to quickly learn a new technology or framework.", + "Describe how you handled finding a major bug right before a release.", + "Give an example of a time you worked under a tight deadline. How did you manage your time?", + "Tell me about a time you collaborated with others to solve a complex technical issue.", + "Explain a time you had to simplify a complex idea for someone less technical.", + "Describe a situation where you had to balance writing clean code with meeting performance requirements.", + "Tell me about a time you disagreed with a teammate on implementation strategy. How was it resolved?", + "What’s an example of when you went beyond the requirements to improve a product or feature?", + "Describe a time you received critical feedback on your code. How did you respond?", + "Tell me about a time you identified an inefficiency in a process and improved it.", +]; - description = 'Practice answering common interview questions for a particular job role.'; +const sysAdmin: string[] = [ + "Tell me about a time you diagnosed and resolved a critical system outage.", + "Describe a situation where you automated a repetitive task to improve efficiency.", + "Give an example of when you had to communicate a technical issue to non-technical staff.", + "Describe a time you handled multiple urgent tickets at once. How did you prioritize?", + "Tell me about a mistake you made in system configuration and how you fixed it.", + "Describe a time you improved system reliability or uptime.", + "Tell me about a time you proposed or implemented a security enhancement.", + "Describe a challenging incident involving data loss or backup recovery.", + "How have you handled implementing a major infrastructure upgrade with minimal downtime?", + "Give an example of how you’ve ensured compliance with IT security policies.", +]; + +const dataScientist: string[] = [ + "Tell me about a time you used data to influence a major decision.", + "Describe a project where you had to work with incomplete or messy data.", + "Explain a time when your analysis revealed something unexpected. What did you do?", + "Tell me about a model or algorithm you developed and how you validated it.", + "Describe how you balanced statistical accuracy with practical constraints.", + "Give an example of explaining complex data insights to a non-technical audience.", + "Describe how you’ve collaborated with engineers or business stakeholders to deliver a data product.", + "Tell me about a time your findings were challenged. How did you defend or revise your analysis?", + "Explain how you’ve ensured data quality or integrity in your work.", + "Tell me about a time you had to choose between multiple analytical approaches.", +]; + +const uxuiDesigner: string[] = [ + "Describe a challenging design problem you solved and your approach.", + "Tell me about a time you balanced user needs with business goals.", + "Give an example of how you handled negative feedback on your design.", + "Describe a time you had to advocate for the user experience in a product meeting.", + "Tell me about a project where you collaborated closely with developers.", + "Describe a time you adapted your design process to meet tight deadlines.", + "Tell me about a design decision that didn’t go as planned. What did you learn?", + "Give an example of how user testing influenced your final design.", + "Tell me about a time you had to compromise on your design vision.", + "Describe how you stay updated on design trends and tools.", +]; + +const projManager: string[] = [ + "Tell me about a project that went off track and how you got it back under control.", + "Describe a time you had to manage conflicting stakeholder priorities.", + "Give an example of how you motivated your team during a challenging phase.", + "Tell me about a project where you had to deliver results under significant constraints.", + "Describe how you handled a disagreement between team members.", + "Explain how you adapted to a major scope change late in a project.", + "Tell me about a time you had to make a difficult trade-off between quality, cost, and speed.", + "Describe a situation where you had to communicate bad news to stakeholders.", + "Tell me about a project you’re most proud of and why.", + "Give an example of how you’ve built trust within a new or distributed team.", +]; + +export default class extends Command { + description = + "Practice answering common interview questions for a particular job role."; async run( interaction: ChatInputCommandInteraction ): Promise | void> { const jobOptions = [ { - label: 'Software Engineer', - value: 'software_engineer' + label: "Software Engineer", + value: "software_engineer", }, { - label: 'Systems Administrator', - value: 'systems_administrator' + label: "Systems Administrator", + value: "systems_administrator", }, { - label: 'Data Scientist', - value: 'data_scientist' + label: "Data Scientist", + value: "data_scientist", }, { - label: 'UI/UX Designer', - value: 'ui_ux_designer' + label: "UI/UX Designer", + value: "ui_ux_designer", }, { - label: 'IT Project Manager', - value: 'it_project_manager' - } + label: "IT Project Manager", + value: "it_project_manager", + }, ]; const selectMenu = new StringSelectMenuBuilder() - .setCustomId('interview_job_select') - .setPlaceholder('Select a job role...') + .setCustomId("interview_job_select") + .setPlaceholder("Select a job role...") .addOptions(jobOptions); - const row = new ActionRowBuilder().addComponents(selectMenu); + const row = + new ActionRowBuilder().addComponents( + selectMenu + ); await interaction.reply({ - content: - 'Choose a job role to practice interview questions:', - components: [row] + content: "Choose a job role to practice interview questions:", + components: [row], }); return; } - } -export async function handleInterviewOptionSelect(i: StringSelectMenuInteraction): Promise { +export async function handleInterviewOptionSelect( + i: StringSelectMenuInteraction +): Promise { + // get the dropdown selection + const choice = i.values?.[0]; + if (!choice) { + await i.reply({ content: "No job role selected.", ephemeral: true }); + return; + } + + // start a DM conversation with the user + let dmChannel; try { - await i.user.send('Here is where the interview will take place.'); - await i.reply({ content: 'Check your DMs for the interview', ephemeral: true }); + dmChannel = await i.user.createDM(); + await dmChannel.send( + "Starting your practice interview. You will receive 5 questions. You will have 5 minutes per question." + ); + await i.reply({ + content: "Check your DMs for the interview.", + ephemeral: true, + }); } catch (err) { - await i.reply({ content: "I couldn't DM you. Please check your privacy settings.", ephemeral: true }); + await i.reply({ + content: "I couldn't DM you. Maybe check your privacy settings?", + ephemeral: true, + }); + return; } -} -// General interview questions -const genQuestions: string[] = [ - 'Tell me about a challenge you faced and how you overcame it.', - 'How do you handle working under pressure?', - 'Describe a mistake you’ve made and what you learned from it.', - 'Tell me about a time you set and achieved a meaningful goal.', - 'Describe a decision you made that others disagreed with. How did you handle it?', - 'Do you prefer working independently or in a team? Provide an example.', - 'What do you do when your opinion conflicts with someone else’s?', - 'Tell me about a time you motivated or supported a teammate.', - 'Describe a time you had to adapt quickly to change.', - 'How do you handle receiving constructive criticism?', - 'Tell me about a time when your initiative improved a process or outcome.', - 'Describe how you stay organized when balancing multiple tasks.', - 'Tell me about a time you showed leadership without having a formal title.' -]; -// The following are all interview questions tailored to specific job roles -const softwareDevEng: string[] = [ - 'Describe a particularly difficult technical problem you faced and how you resolved it.', - 'Tell me about a project where you had to quickly learn a new technology or framework.', - 'Describe how you handled finding a major bug right before a release.', - 'Give an example of a time you worked under a tight deadline. How did you manage your time?', - 'Tell me about a time you collaborated with others to solve a complex technical issue.', - 'Explain a time you had to simplify a complex idea for someone less technical.', - 'Describe a situation where you had to balance writing clean code with meeting performance requirements.', - 'Tell me about a time you disagreed with a teammate on implementation strategy. How was it resolved?', - 'What’s an example of when you went beyond the requirements to improve a product or feature?', - 'Describe a time you received critical feedback on your code. How did you respond?', - 'Tell me about a time you identified an inefficiency in a process and improved it.' -]; + let questions = [...genQuestions]; + if (choice === "software_engineer") { + questions = questions.concat(softwareDevEng); + } else if (choice === "systems_administrator") { + questions = questions.concat(sysAdmin); + } else if (choice === "data_scientist") { + questions = questions.concat(dataScientist); + } else if (choice === "ui_ux_designer") { + questions = questions.concat(uxuiDesigner); + } else if (choice === "it_project_manager") { + questions = questions.concat(projManager); + } -const sysAdmin: string[] = [ - 'Tell me about a time you diagnosed and resolved a critical system outage.', - 'Describe a situation where you automated a repetitive task to improve efficiency.', - 'Give an example of when you had to communicate a technical issue to non-technical staff.', - 'Describe a time you handled multiple urgent tickets at once. How did you prioritize?', - 'Tell me about a mistake you made in system configuration and how you fixed it.', - 'Describe a time you improved system reliability or uptime.', - 'Tell me about a time you proposed or implemented a security enhancement.', - 'Describe a challenging incident involving data loss or backup recovery.', - 'How have you handled implementing a major infrastructure upgrade with minimal downtime?', - 'Give an example of how you’ve ensured compliance with IT security policies.' -]; + // shuffle all the questions and pick the first five + const pool = questions.slice(); + for (let index = pool.length - 1; index > 0; index--) { + const swap = Math.floor(Math.random() * (index + 1)); + [pool[index], pool[swap]] = [pool[swap], pool[index]]; + } + const selectedQuestions = pool.slice(0, 5); -const dataScientist: string[] = [ - 'Tell me about a time you used data to influence a major decision.', - 'Describe a project where you had to work with incomplete or messy data.', - 'Explain a time when your analysis revealed something unexpected. What did you do?', - 'Tell me about a model or algorithm you developed and how you validated it.', - 'Describe how you balanced statistical accuracy with practical constraints.', - 'Give an example of explaining complex data insights to a non-technical audience.', - 'Describe how you’ve collaborated with engineers or business stakeholders to deliver a data product.', - 'Tell me about a time your findings were challenged. How did you defend or revise your analysis?', - 'Explain how you’ve ensured data quality or integrity in your work.', - 'Tell me about a time you had to choose between multiple analytical approaches.' -]; + const answers: string[] = []; -const uxuiDesigner: string[] = [ - 'Describe a challenging design problem you solved and your approach.', - 'Tell me about a time you balanced user needs with business goals.', - 'Give an example of how you handled negative feedback on your design.', - 'Describe a time you had to advocate for the user experience in a product meeting.', - 'Tell me about a project where you collaborated closely with developers.', - 'Describe a time you adapted your design process to meet tight deadlines.', - 'Tell me about a design decision that didn’t go as planned. What did you learn?', - 'Give an example of how user testing influenced your final design.', - 'Tell me about a time you had to compromise on your design vision.', - 'Describe how you stay updated on design trends and tools.' -]; + for (let qIndex = 0; qIndex < selectedQuestions.length; qIndex++) { + const questionText = `Question ${qIndex + 1}/5: ${ + selectedQuestions[qIndex] + }`; + await dmChannel.send(questionText); -const projManager: string[] = [ - 'Tell me about a project that went off track and how you got it back under control.', - 'Describe a time you had to manage conflicting stakeholder priorities.', - 'Give an example of how you motivated your team during a challenging phase.', - 'Tell me about a project where you had to deliver results under significant constraints.', - 'Describe how you handled a disagreement between team members.', - 'Explain how you adapted to a major scope change late in a project.', - 'Tell me about a time you had to make a difficult trade-off between quality, cost, and speed.', - 'Describe a situation where you had to communicate bad news to stakeholders.', - 'Tell me about a project you’re most proud of and why.', - 'Give an example of how you’ve built trust within a new or distributed team.' -]; + // collect the user's responses, 5 minutes per question + try { + const collected = await dmChannel.awaitMessages({ + filter: (m) => m.author.id === i.user.id, + max: 1, + time: 5 * 60 * 1000, // 5 minutes + errors: ["time"], + }); + + // if they don't reply, end the interview + const reply = collected.first(); + if (!reply) { + await dmChannel.send( + "No answer received. Ending the interview." + ); + break; + } + + const content = reply.content.trim(); + + answers.push(content); + + // eslint-disable-next-line no-await-in-loop + await new Promise((res) => setTimeout(res, 800)); + } catch (err) { + // timeout or other error + await dmChannel.send( + "Time expired waiting for a reply. Interview ended." + ); + break; + } + } + await dmChannel.send("Interview complete."); +} diff --git a/src/commands/jobs/jobform.ts b/src/commands/jobs/jobform.ts index 829dc710..137f22d3 100644 --- a/src/commands/jobs/jobform.ts +++ b/src/commands/jobs/jobform.ts @@ -34,6 +34,7 @@ const questions: string[] = [ ]; export default class JobFormCommand extends Command { + name = 'jobform'; description = 'Starts a job preferences form via direct message.'; options: ApplicationCommandOptionData[] = []; @@ -148,4 +149,5 @@ export default class JobFormCommand extends Command { // start the first question ask(); } + } From 208cb532f47db50f99ced073433fa9eda09725f9 Mon Sep 17 00:00:00 2001 From: ViaBouvier Date: Wed, 3 Dec 2025 12:46:48 -0500 Subject: [PATCH 7/7] workaround for guild member timeout error --- src/pieces/verification.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pieces/verification.ts b/src/pieces/verification.ts index d46595a2..9f6f4da3 100644 --- a/src/pieces/verification.ts +++ b/src/pieces/verification.ts @@ -23,7 +23,9 @@ export async function verify(interaction: ModalSubmitInteraction, bot: Client, g async function register(bot: Client): Promise { const guild = await bot.guilds.fetch(GUILDS.MAIN); - guild.members.fetch(); + guild.members.fetch().catch(err => { + console.warn('guild.members.fetch() failed during verification', err); + }); } export default register;