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

Issue 54 #84

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Issue 54 #84

wants to merge 3 commits into from

Conversation

johan-t
Copy link
Contributor

@johan-t johan-t commented Oct 29, 2023

What Issue did you fix?

Fixes: #54

Quick description of your approach:

This is a follow up to @q-Sci PR. When finding a match it will go through all of the conversations for that user and skip the users as BestMatch that the user has had a conversation with before.
Also instead of calling sendQuestion it calls intiateConversation and calls sendQuestion when the test is not complete.

Checklist before requesting a review:

  • I have removed the comments fron the questions
  • I have added comments to my code, particularly in hard-to-understand areas
  • I have removed all of the debugging 'console.logs'
  • I have ensured that all of my variables, functions, etc. are named sensibly (Are able to be understood by someone who has not seen my code before)
  • I have read through my changes to make sure that I did not change anything that was not related to the issue I am fixing

@johan-t
Copy link
Contributor Author

johan-t commented Oct 29, 2023

Also I changed question.json to questions.ts, because json does not allow comments

@q-Sci
Copy link
Contributor

q-Sci commented Oct 31, 2023

The initial use of the /match command (before taking the test) returns some error:

TypeError: text.split is not a function
    at decrypt (/home/qsci/Projects/ContraBot/encryptionUtils.ts:18:28)
    at executeMatch (/home/qsci/Projects/ContraBot/commands/match-command.ts:11:71)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Client.<anonymous> (/home/qsci/Projects/ContraBot/index.ts:58:17)
TypeError: text.split is not a function
    at decrypt (/home/qsci/Projects/ContraBot/encryptionUtils.ts:18:28)
    at executeMatch (/home/qsci/Projects/ContraBot/commands/match-command.ts:11:71)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Client.<anonymous> (/home/qsci/Projects/ContraBot/index.ts:58:17)

@q-Sci
Copy link
Contributor

q-Sci commented Oct 31, 2023

Also I cant't test it completely now because all the old db entries are invalid or something: Skipped: userVector for userId <user-id> is not a string.

@johan-t
Copy link
Contributor Author

johan-t commented Oct 31, 2023

Also I cant't test it completely now because all the old db entries are invalid or something: Skipped: userVector for userId <user-id> is not a string.

You can create new entries, by doing the test and then copying your user and changing the userId

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Prevent two users beeing matched twice
2 participants