jitacm / -30DaysDevChallenge-

Welcome to the 30DayDevChallenge repository! This repository is dedicated to a month-long coding challenge designed to help developers of all levels enhance their skills through daily coding tasks and projects.
19 stars 28 forks source link

Whatsapp Bot / 30_Day_of_JavaScript #203 #266

Closed Bharat00007 closed 3 months ago

Bharat00007 commented 3 months ago

### WhatsApp Math Chatbot Integration #203

This pull request introduces a comprehensive WhatsApp-based math chatbot built with Node.js, whatsapp-web.js, and the WolframAlpha API. The bot is designed to handle a wide range of math-related queries, offering both textual and visual responses directly within a WhatsApp conversation.

Key Features:

WhatsApp Integration:

Utilizes the whatsapp-web.js library to seamlessly connect with WhatsApp Web, allowing the bot to send and receive messages in real-time. Persistent session handling through session.json ensures the bot remains authenticated across restarts without the need to re-scan the QR code.

WolframAlpha API Integration:

The bot leverages the power of WolframAlpha to process complex mathematical queries and return accurate results. Supports both textual answers and graphical representations, providing a richer user experience for various types of mathematical problems.

Modular Codebase:

API Wrapper: The WolframAlphaAPI.js module provides a custom wrapper around the WolframAlpha API, streamlining the process of making API requests and handling responses.

Image Handling: The handleImage.js module manages requests for images, such as graphs or plots, generated by WolframAlpha.

Command Handling: The bot listens for specific commands (e.g., !b) to trigger different types of queries, ensuring a user-friendly interaction model.

Enhanced User Experience:

Users can ask a wide range of questions, from simple arithmetic to complex calculus, and receive instant answers directly on WhatsApp. The bot intelligently determines when to return an image (e.g., for graphs or visual solutions) or when to provide a textual answer, ensuring the most appropriate response format.

Scalable Design:

The project is structured to allow for easy expansion and integration of additional features in the future, such as support for more types of queries or integration with other APIs.

Screenshot 2024-08-11 181750

github-actions[bot] commented 3 months ago

Thank you for submitting your pull request! 🙌 We'll review it as soon as possible. In the meantime, please ensure that your changes align with our [CONTRIBUTING.md]. If there are any specific instructions or feedback regarding your PR, we'll provide them here. Thanks again for your contribution! 😊