Kambô is a simple chatbot built with HTML, CSS, and JavaScript. It uses the Fetch API to retrieve chatbot data in JSON format, and responds to user input with pre-defined answers. The chatbot also responds to certain commands that allow users to customize the chat window, change the chatbot's mood, and switch between different languages.
- Responds to user input with pre-defined answers
- Supports multiple languages
- Allows users to customize the chat window with commands
- Changes the chatbot's mood based on the content of the user's message
- Written in HTML, CSS, and JavaScript
-
Clone the repository to your local machine using the following command:
git clone https://github.com/yourusername/kambo-chatbot.git -
Open the
index.htmlfile in your web browser to launch the chatbot. -
Enter a message in the chat window and press "Send" to see the chatbot's response.
-
Try entering commands like
/helpor/colorto see how they work.
The Kambô chatbot supports several commands that allow you to customize the appearance of the chat window. Here are some examples:
/color red- Changes the color of the chatbot's face to red/shadow blue- Changes the color of the chatbot's shadow to blue/clear- Clears the chat window/state happy- Changes the chatbot's mood to happy
The Kambô chatbot also supports multiple languages. Here's how to switch between them:
-
Open the
index.jsfile in your text editor. -
Locate the
CHAT_LANGUAGE_FILESobject at the top of the file. -
Modify the object to include the language file(s) you want to use:
const CHAT_LANGUAGE_FILES = {
EN: 'chatbot-en.json',
PT: 'chatbot-pt.json',
ES: 'chatbot-es.json',
};
- Save the changes to
index.jsand refresh the page in your web browser to see the new language in action.
- Adriel Higor