Skip to content

Commit

Permalink
small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
q-Sci committed Oct 9, 2023
1 parent ae59198 commit d97e961
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions commands/match/match-command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,15 @@ export const sendQuestion = async (interaction: any) => {
let currentQuestionIndex = userContext?.currentQuestionIndex || 0;
let userResponses = userContext?.userVector || [];

// TODO: user responses
// TODO: check if user has completed the test

if (currentQuestionIndex === 0) {
userResponses = [];
}

console.log(userContext);

const guildId = process.env.GUILD_ID;
if (!guildId) throw new Error('GUILD_ID not found');

Expand Down
1 change: 1 addition & 0 deletions commands/test/test-command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ export const sendQuestion = async (interaction: any) => {
console.warn('No best match found');
interaction.user.send("Leider konnte zur Zeit kein geeigneter Gesprächspartner gefunden werden. Bitte versuchen Sie es später erneut.");
}

// Reset context for this user in the database
await db.db('contrabot').collection("users").updateOne(
{ userId: interaction.user.id },
Expand Down

0 comments on commit d97e961

Please sign in to comment.