Skip to content

The French Bot - Chatbot project - Jenny A#295

Open
jempa182 wants to merge 2 commits intoTechnigo:mainfrom
jempa182:main
Open

The French Bot - Chatbot project - Jenny A#295
jempa182 wants to merge 2 commits intoTechnigo:mainfrom
jempa182:main

Conversation

@jempa182
Copy link

Copy link
Contributor

@HIPPIEKICK HIPPIEKICK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What a cute bot idea 🇫🇷 😊 Let's look at some feedback!

JavaScript

  • Nice addition with a sound! Crazy idea - would be fun with different sounds if the user answers right or wrong
  • The code is divided into logical functions, which is a good practice. For instance, separating the playSendSound and playReceiveSound functions helps keep the code modular.
  • If the user clicks the send button multiple times quickly, it might cause unintended behavior (e.g., repeated messages). To prevent this, consider disabling the input field and button temporarily during processing.

Clean Code

  • Variables and functions have clear and descriptive names, such as handleNameInput, createFrenchButtons, and playSendSound. This makes the code readable and maintainable. Consider changing e.g. goodByeMessage to follow the same convention

Nice idea and well executed ⭐

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

haha 👌

Send
</button>
</form>
<div id="button-container" style="display: none;"></div>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep styling out of the HTML file 👀

buttonContainer.style.display = 'flex'; // Show buttons

// Add event listeners to buttons
buttonContainer.querySelectorAll('button').forEach(button => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice usage of forEach 👍

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.

2 participants