Full Code of yesbhautik/Whatsapp-Ai-BOT for AI

main 05593ec3ee54 cached
19 files
73.8 KB
25.8k tokens
6 symbols
1 requests
Download .txt
Repository: yesbhautik/Whatsapp-Ai-BOT
Branch: main
Commit: 05593ec3ee54
Files: 19
Total size: 73.8 KB

Directory structure:
gitextract_6j4livl0/

├── .deepsource.toml
├── .github/
│   ├── CODEOWNERS
│   ├── CODE_OF_CONDUCT.md
│   ├── FUNDING.yml
│   ├── ISSUE_TEMPLATE/
│   │   ├── bug_report.md
│   │   └── feature_request.md
│   ├── PULL_REQUEST_TEMPLATE.md
│   └── SECURITY.md
├── .gitignore
├── Docs/
│   └── Deployment/
│       ├── Android.md
│       ├── Linux.md
│       ├── MacOS.md
│       └── Windows.md
├── LICENSE
├── README.md
├── example.key.json
├── index.js
├── package.json
└── yesbhautikai.js

================================================
FILE CONTENTS
================================================

================================================
FILE: .deepsource.toml
================================================
version = 1

[[analyzers]]
name = "python"

  [analyzers.meta]
  runtime_version = "3.x.x"

================================================
FILE: .github/CODEOWNERS
================================================



================================================
FILE: .github/CODE_OF_CONDUCT.md
================================================
# Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment include:

- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

- The use of sexualized language or imagery and unwelcome sexual attention or advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [hi@yesbhautik.co.in](mailto:hi@yesbhautik.co.in). All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 1.4, available at [https://www.contributor-covenant.org/version/1/4/code-of-conduct.html](https://www.contributor-covenant.org/version/1/4/code-of-conduct.html).


================================================
FILE: .github/FUNDING.yml
================================================
github: yesbhautik
patreon: 
open_collective: 
ko_fi: 
tidelift: 
community_bridge: 
liberapay: 
issuehunt: 
otechie: 
lfx_crowdfunding: 


================================================
FILE: .github/ISSUE_TEMPLATE/bug_report.md
================================================
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
 - OS: [e.g. iOS]
 - Browser [e.g. chrome, safari]
 - Version [e.g. 22]

**Smartphone (please complete the following information):**
 - Device: [e.g. iPhone6]
 - OS: [e.g. iOS8.1]
 - Browser [e.g. stock browser, safari]
 - Version [e.g. 22]

**Additional context**
Add any other context about the problem here.


================================================
FILE: .github/ISSUE_TEMPLATE/feature_request.md
================================================
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.


================================================
FILE: .github/PULL_REQUEST_TEMPLATE.md
================================================



================================================
FILE: .github/SECURITY.md
================================================
# Security Policy

## Supported Versions

Use this section to tell people about which versions of your project are currently being supported with security updates.

| Version | Supported          |
| ------- | ------------------ |
| 2.1.0   | :white_check_mark: |
| < 2.1.0 | :x:                |

## Reporting a Vulnerability

If you believe you have found a security vulnerability in our project, we encourage you to let us know right away. We will investigate all legitimate reports and do our best to quickly fix the problem. Please do not disclose the issue publicly until we have had a chance to address it.

### How to Report a Security Vulnerability?

To report a security issue, please send an email to [hi@yesbhautik.co.in](mailto:hi@yesbhautik.co.in) with the following information:
- A clear description of the issue, including how it can be reproduced.
- Any relevant screenshots or logs.
- Your contact information for follow-up.

We take all security bugs seriously and appreciate your efforts to responsibly disclose your findings.

### What to Expect?

After submitting a report, you should receive an acknowledgment of your report within 48 hours, and we'll strive to keep you informed about our progress toward a fix and full announcement. We may also ask for additional information or guidance.

Thank you for helping keep our project and our users safe.


================================================
FILE: .gitignore
================================================
# ignore node modules
node_modules/

# ignore /yesbhautik/* excluding convo.txt file
/yesbhautik/*
!/yesbhautik/convo.txt

# ignore package-lock.json
package-lock.json

key.json


================================================
FILE: Docs/Deployment/Android.md
================================================
### Deploy on Android/Termux<br>
1. Install Termux App: [Click link to download](https://f-droid.org/en/packages/com.termux/)

2. Install NodeJS, nano and Git:
   
   ```bash
   pkg install git nodejs nano -y
   ```
   
3. Clone the repository:
   
   ```bash
   git clone https://github.com/yesbhautik/Whatsapp-Ai-BOT
   ```
   
4. Go to the project directory:
   
   ```bash
   cd Whatsapp-Ai-BOT
   ```
   
5. Install node_modules manually by downloading [here](https://go.yesbhautik.co.in/m1n07d1r) and extracting to the project directory.
   
6. Configure OpenAI API
   
   ```bash
   cp example.key.json key.json
   nano key.json
   ```
   > Replace "OPENAI_API_KEY" with your actual [OpenAI API](https://go.yesbhautik.co.in/8b2ayw) key.
   
7. Run the project:
   ```
   node index.js
   ```


================================================
FILE: Docs/Deployment/Linux.md
================================================
### Deploy on Linux</br>
1. Install NodeJS, nano and Git Bash.

      ```bash
      sudo apt -y remove nodejs
      curl -fsSl https://deb.nodesource.com/setup_lts.x | sudo bash - && sudo apt -y install nodejs
      apt install git nano -y
      ```
      
2. Clone the repository:
   
   ```bash
   git clone https://github.com/yesbhautik/Whatsapp-Ai-BOT
   ```
   
3. Go to the project directory:
   ```bash
   cd Whatsapp-Ai-BOT
   ```
4. Clean NPM Cache:
   
   ```bash
   npm cache clean --force
   ```
   
5. Install dependencies:
   
   ```bash
   npm i
   ```
   
6. Configure OpenAI API
   
   ```bash
   cp example.key.json key.json
   nano key.json
   ```
   > Replace "OPENAI_API_KEY" with your actual [OpenAI API](https://go.yesbhautik.co.in/8b2ayw) key.
   
7. Run the project:
   
   ```bash
   npm start
   ```


================================================
FILE: Docs/Deployment/MacOS.md
================================================
### Deploy on MacOS</br>
1. Install NodeJS, nano and Git Bash.

      ```bash
      sudo apt -y remove nodejs
      curl -fsSl https://deb.nodesource.com/setup_lts.x | sudo bash - && sudo apt -y install nodejs
      apt install git nano -y
      ```
      
2. Clone the repository:
   
   ```bash
   git clone https://github.com/yesbhautik/Whatsapp-Ai-BOT
   ```
   
3. Go to the project directory:
   ```bash
   cd Whatsapp-Ai-BOT
   ```
4. Clean NPM Cache:
   
   ```bash
   npm cache clean --force
   ```
   
5. Install dependencies:
   
   ```bash
   npm i
   ```
   
6. Configure OpenAI API
   
   ```bash
   cp example.key.json key.json
   nano key.json
   ```
   > Replace "OPENAI_API_KEY" with your actual [OpenAI API](https://go.yesbhautik.co.in/8b2ayw) key.
   
7. Run the project:
   
   ```bash
   npm start
   ```



================================================
FILE: Docs/Deployment/Windows.md
================================================
### Deploy on Windows</br>
1. Install NodeJS and Git Bash.
      - NodeJS https://nodejs.org/en/download/ <br>
      - Git https://git-scm.com/downloads/
      - After this run following command in powershell
   <br>

   ```bash
   npm install -g npm
   ```

2. Clone the repository:

   ```bash
   git clone https://github.com/yesbhautik/Whatsapp-Ai-BOT
   ```

3. Go to the project directory:

   ```bash
   cd Whatsapp-Ai-BOT
   ```

4. Clean NPM Cache:

   ```bash
   npm cache clean --force
   ```

5. Install dependencies:

   ```bash
   npm i
   ```

6. Configure OpenAI API

   ```bash
   cp example.key.json key.json
   notepad key.json
   ```

   > Replace "OPENAI_API_KEY" with your actual [OpenAI API](https://go.yesbhautik.co.in/8b2ayw) key.
7. Run the project:

   ```bash
   npm start
   ```
   


================================================
FILE: LICENSE
================================================
Attribution-NonCommercial-ShareAlike 4.0 International

=======================================================================

Creative Commons Corporation ("Creative Commons") is not a law firm and
does not provide legal services or legal advice. Distribution of
Creative Commons public licenses does not create a lawyer-client or
other relationship. Creative Commons makes its licenses and related
information available on an "as-is" basis. Creative Commons gives no
warranties regarding its licenses, any material licensed under their
terms and conditions, or any related information. Creative Commons
disclaims all liability for damages resulting from their use to the
fullest extent possible.

Using Creative Commons Public Licenses

Creative Commons public licenses provide a standard set of terms and
conditions that creators and other rights holders may use to share
original works of authorship and other material subject to copyright
and certain other rights specified in the public license below. The
following considerations are for informational purposes only, are not
exhaustive, and do not form part of our licenses.

     Considerations for licensors: Our public licenses are
     intended for use by those authorized to give the public
     permission to use material in ways otherwise restricted by
     copyright and certain other rights. Our licenses are
     irrevocable. Licensors should read and understand the terms
     and conditions of the license they choose before applying it.
     Licensors should also secure all rights necessary before
     applying our licenses so that the public can reuse the
     material as expected. Licensors should clearly mark any
     material not subject to the license. This includes other CC-
     licensed material, or material used under an exception or
     limitation to copyright. More considerations for licensors:
    wiki.creativecommons.org/Considerations_for_licensors

     Considerations for the public: By using one of our public
     licenses, a licensor grants the public permission to use the
     licensed material under specified terms and conditions. If
     the licensor's permission is not necessary for any reason--for
     example, because of any applicable exception or limitation to
     copyright--then that use is not regulated by the license. Our
     licenses grant only permissions under copyright and certain
     other rights that a licensor has authority to grant. Use of
     the licensed material may still be restricted for other
     reasons, including because others have copyright or other
     rights in the material. A licensor may make special requests,
     such as asking that all changes be marked or described.
     Although not required by our licenses, you are encouraged to
     respect those requests where reasonable. More considerations
     for the public:
    wiki.creativecommons.org/Considerations_for_licensees

=======================================================================

Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
Public License

By exercising the Licensed Rights (defined below), You accept and agree
to be bound by the terms and conditions of this Creative Commons
Attribution-NonCommercial-ShareAlike 4.0 International Public License
("Public License"). To the extent this Public License may be
interpreted as a contract, You are granted the Licensed Rights in
consideration of Your acceptance of these terms and conditions, and the
Licensor grants You such rights in consideration of benefits the
Licensor receives from making the Licensed Material available under
these terms and conditions.


Section 1 -- Definitions.

  a. Adapted Material means material subject to Copyright and Similar
     Rights that is derived from or based upon the Licensed Material
     and in which the Licensed Material is translated, altered,
     arranged, transformed, or otherwise modified in a manner requiring
     permission under the Copyright and Similar Rights held by the
     Licensor. For purposes of this Public License, where the Licensed
     Material is a musical work, performance, or sound recording,
     Adapted Material is always produced where the Licensed Material is
     synched in timed relation with a moving image.

  b. Adapter's License means the license You apply to Your Copyright
     and Similar Rights in Your contributions to Adapted Material in
     accordance with the terms and conditions of this Public License.

  c. BY-NC-SA Compatible License means a license listed at
     creativecommons.org/compatiblelicenses, approved by Creative
     Commons as essentially the equivalent of this Public License.

  d. Copyright and Similar Rights means copyright and/or similar rights
     closely related to copyright including, without limitation,
     performance, broadcast, sound recording, and Sui Generis Database
     Rights, without regard to how the rights are labeled or
     categorized. For purposes of this Public License, the rights
     specified in Section 2(b)(1)-(2) are not Copyright and Similar
     Rights.

  e. Effective Technological Measures means those measures that, in the
     absence of proper authority, may not be circumvented under laws
     fulfilling obligations under Article 11 of the WIPO Copyright
     Treaty adopted on December 20, 1996, and/or similar international
     agreements.

  f. Exceptions and Limitations means fair use, fair dealing, and/or
     any other exception or limitation to Copyright and Similar Rights
     that applies to Your use of the Licensed Material.

  g. License Elements means the license attributes listed in the name
     of a Creative Commons Public License. The License Elements of this
     Public License are Attribution, NonCommercial, and ShareAlike.

  h. Licensed Material means the artistic or literary work, database,
     or other material to which the Licensor applied this Public
     License.

  i. Licensed Rights means the rights granted to You subject to the
     terms and conditions of this Public License, which are limited to
     all Copyright and Similar Rights that apply to Your use of the
     Licensed Material and that the Licensor has authority to license.

  j. Licensor means the individual(s) or entity(ies) granting rights
     under this Public License.

  k. NonCommercial means not primarily intended for or directed towards
     commercial advantage or monetary compensation. For purposes of
     this Public License, the exchange of the Licensed Material for
     other material subject to Copyright and Similar Rights by digital
     file-sharing or similar means is NonCommercial provided there is
     no payment of monetary compensation in connection with the
     exchange.

  l. Share means to provide material to the public by any means or
     process that requires permission under the Licensed Rights, such
     as reproduction, public display, public performance, distribution,
     dissemination, communication, or importation, and to make material
     available to the public including in ways that members of the
     public may access the material from a place and at a time
     individually chosen by them.

  m. Sui Generis Database Rights means rights other than copyright
     resulting from Directive 96/9/EC of the European Parliament and of
     the Council of 11 March 1996 on the legal protection of databases,
     as amended and/or succeeded, as well as other essentially
     equivalent rights anywhere in the world.

  n. You means the individual or entity exercising the Licensed Rights
     under this Public License. Your has a corresponding meaning.


Section 2 -- Scope.

  a. License grant.

       1. Subject to the terms and conditions of this Public License,
          the Licensor hereby grants You a worldwide, royalty-free,
          non-sublicensable, non-exclusive, irrevocable license to
          exercise the Licensed Rights in the Licensed Material to:

            a. reproduce and Share the Licensed Material, in whole or
               in part, for NonCommercial purposes only; and

            b. produce, reproduce, and Share Adapted Material for
               NonCommercial purposes only.

       2. Exceptions and Limitations. For the avoidance of doubt, where
          Exceptions and Limitations apply to Your use, this Public
          License does not apply, and You do not need to comply with
          its terms and conditions.

       3. Term. The term of this Public License is specified in Section
          6(a).

       4. Media and formats; technical modifications allowed. The
          Licensor authorizes You to exercise the Licensed Rights in
          all media and formats whether now known or hereafter created,
          and to make technical modifications necessary to do so. The
          Licensor waives and/or agrees not to assert any right or
          authority to forbid You from making technical modifications
          necessary to exercise the Licensed Rights, including
          technical modifications necessary to circumvent Effective
          Technological Measures. For purposes of this Public License,
          simply making modifications authorized by this Section 2(a)
          (4) never produces Adapted Material.

       5. Downstream recipients.

            a. Offer from the Licensor -- Licensed Material. Every
               recipient of the Licensed Material automatically
               receives an offer from the Licensor to exercise the
               Licensed Rights under the terms and conditions of this
               Public License.

            b. Additional offer from the Licensor -- Adapted Material.
               Every recipient of Adapted Material from You
               automatically receives an offer from the Licensor to
               exercise the Licensed Rights in the Adapted Material
               under the conditions of the Adapter's License You apply.

            c. No downstream restrictions. You may not offer or impose
               any additional or different terms or conditions on, or
               apply any Effective Technological Measures to, the
               Licensed Material if doing so restricts exercise of the
               Licensed Rights by any recipient of the Licensed
               Material.

       6. No endorsement. Nothing in this Public License constitutes or
          may be construed as permission to assert or imply that You
          are, or that Your use of the Licensed Material is, connected
          with, or sponsored, endorsed, or granted official status by,
          the Licensor or others designated to receive attribution as
          provided in Section 3(a)(1)(A)(i).

  b. Other rights.

       1. Moral rights, such as the right of integrity, are not
          licensed under this Public License, nor are publicity,
          privacy, and/or other similar personality rights; however, to
          the extent possible, the Licensor waives and/or agrees not to
          assert any such rights held by the Licensor to the limited
          extent necessary to allow You to exercise the Licensed
          Rights, but not otherwise.

       2. Patent and trademark rights are not licensed under this
          Public License.

       3. To the extent possible, the Licensor waives any right to
          collect royalties from You for the exercise of the Licensed
          Rights, whether directly or through a collecting society
          under any voluntary or waivable statutory or compulsory
          licensing scheme. In all other cases the Licensor expressly
          reserves any right to collect such royalties, including when
          the Licensed Material is used other than for NonCommercial
          purposes.


Section 3 -- License Conditions.

Your exercise of the Licensed Rights is expressly made subject to the
following conditions.

  a. Attribution.

       1. If You Share the Licensed Material (including in modified
          form), You must:

            a. retain the following if it is supplied by the Licensor
               with the Licensed Material:

                 i. identification of the creator(s) of the Licensed
                    Material and any others designated to receive
                    attribution, in any reasonable manner requested by
                    the Licensor (including by pseudonym if
                    designated);

                ii. a copyright notice;

               iii. a notice that refers to this Public License;

                iv. a notice that refers to the disclaimer of
                    warranties;

                 v. a URI or hyperlink to the Licensed Material to the
                    extent reasonably practicable;

            b. indicate if You modified the Licensed Material and
               retain an indication of any previous modifications; and

            c. indicate the Licensed Material is licensed under this
               Public License, and include the text of, or the URI or
               hyperlink to, this Public License.

       2. You may satisfy the conditions in Section 3(a)(1) in any
          reasonable manner based on the medium, means, and context in
          which You Share the Licensed Material. For example, it may be
          reasonable to satisfy the conditions by providing a URI or
          hyperlink to a resource that includes the required
          information.
       3. If requested by the Licensor, You must remove any of the
          information required by Section 3(a)(1)(A) to the extent
          reasonably practicable.

  b. ShareAlike.

     In addition to the conditions in Section 3(a), if You Share
     Adapted Material You produce, the following conditions also apply.

       1. The Adapter's License You apply must be a Creative Commons
          license with the same License Elements, this version or
          later, or a BY-NC-SA Compatible License.

       2. You must include the text of, or the URI or hyperlink to, the
          Adapter's License You apply. You may satisfy this condition
          in any reasonable manner based on the medium, means, and
          context in which You Share Adapted Material.

       3. You may not offer or impose any additional or different terms
          or conditions on, or apply any Effective Technological
          Measures to, Adapted Material that restrict exercise of the
          rights granted under the Adapter's License You apply.


Section 4 -- Sui Generis Database Rights.

Where the Licensed Rights include Sui Generis Database Rights that
apply to Your use of the Licensed Material:

  a. for the avoidance of doubt, Section 2(a)(1) grants You the right
     to extract, reuse, reproduce, and Share all or a substantial
     portion of the contents of the database for NonCommercial purposes
     only;

  b. if You include all or a substantial portion of the database
     contents in a database in which You have Sui Generis Database
     Rights, then the database in which You have Sui Generis Database
     Rights (but not its individual contents) is Adapted Material,
     including for purposes of Section 3(b); and

  c. You must comply with the conditions in Section 3(a) if You Share
     all or a substantial portion of the contents of the database.

For the avoidance of doubt, this Section 4 supplements and does not
replace Your obligations under this Public License where the Licensed
Rights include other Copyright and Similar Rights.


Section 5 -- Disclaimer of Warranties and Limitation of Liability.

  a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
     EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
     AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
     ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
     IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
     WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
     PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
     ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
     KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
     ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.

  b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
     TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
     NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
     INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
     COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
     USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
     ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
     DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
     IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.

  c. The disclaimer of warranties and limitation of liability provided
     above shall be interpreted in a manner that, to the extent
     possible, most closely approximates an absolute disclaimer and
     waiver of all liability.


Section 6 -- Term and Termination.

  a. This Public License applies for the term of the Copyright and
     Similar Rights licensed here. However, if You fail to comply with
     this Public License, then Your rights under this Public License
     terminate automatically.

  b. Where Your right to use the Licensed Material has terminated under
     Section 6(a), it reinstates:

       1. automatically as of the date the violation is cured, provided
          it is cured within 30 days of Your discovery of the
          violation; or

       2. upon express reinstatement by the Licensor.

     For the avoidance of doubt, this Section 6(b) does not affect any
     right the Licensor may have to seek remedies for Your violations
     of this Public License.

  c. For the avoidance of doubt, the Licensor may also offer the
     Licensed Material under separate terms or conditions or stop
     distributing the Licensed Material at any time; however, doing so
     will not terminate this Public License.

  d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
     License.


Section 7 -- Other Terms and Conditions.

  a. The Licensor shall not be bound by any additional or different
     terms or conditions communicated by You unless expressly agreed.

  b. Any arrangements, understandings, or agreements regarding the
     Licensed Material not stated herein are separate from and
     independent of the terms and conditions of this Public License.


Section 8 -- Interpretation.

  a. For the avoidance of doubt, this Public License does not, and
     shall not be interpreted to, reduce, limit, restrict, or impose
     conditions on any use of the Licensed Material that could lawfully
     be made without permission under this Public License.

  b. To the extent possible, if any provision of this Public License is
     deemed unenforceable, it shall be automatically reformed to the
     minimum extent necessary to make it enforceable. If the provision
     cannot be reformed, it shall be severed from this Public License
     without affecting the enforceability of the remaining terms and
     conditions.

  c. No term or condition of this Public License will be waived and no
     failure to comply consented to unless expressly agreed to by the
     Licensor.

  d. Nothing in this Public License constitutes or may be interpreted
     as a limitation upon, or waiver of, any privileges and immunities
     that apply to the Licensor or You, including from the legal
     processes of any jurisdiction or authority.

=======================================================================

Creative Commons is not a party to its public
licenses. Notwithstanding, Creative Commons may elect to apply one of
its public licenses to material it publishes and in those instances
will be considered the “Licensor.” The text of the Creative Commons
public licenses is dedicated to the public domain under the CC0 Public
Domain Dedication. Except for the limited purpose of indicating that
material is shared under a Creative Commons public license or as
otherwise permitted by the Creative Commons policies published at
creativecommons.org/policies, Creative Commons does not authorize the
use of the trademark "Creative Commons" or any other trademark or logo
of Creative Commons without its prior written consent including,
without limitation, in connection with any unauthorized modifications
to any of its public licenses or any other arrangements,
understandings, or agreements concerning use of licensed material. For
the avoidance of doubt, this paragraph does not form part of the
public licenses.

Creative Commons may be contacted at creativecommons.org.


================================================
FILE: README.md
================================================
# 💬 Whatsapp-Ai-BOT 🤖
A cutting-edge AI chatbot for WhatsApp 🤖💬 built using NodeJS technology and powered by OpenAI. This project leverages the advanced deep learning models of ChatGPT, Playground, and DALL·E from OpenAI.

## 💻 Created with NodeJS and Baileys Library
This repository contains the source code for a WhatsApp AI Bot that utilizes OpenAI's ChatGPT and DALL-E technology to provide a unique text-based and image-based conversational experience for users. The library used for integration is [Baileys](https://github.com/WhiskeySockets/Baileys). 

## 🔍 READ FIRST
Please note that this bot has 2 features - ChatGPT (text) and DALL-E (Text To Image). To use these features, simply use the commands `/ai`, `/img`, and `/sc` respectively.

## 🔒 Unlock the Magic
The magic of this AI WhatsApp bot lies in its code, which has been carefully crafted and encrypted to protect it from prying eyes. But don't worry, if you need to take a closer look and understand the workings of the bot, just drop me a message on my website or LinkedIn. I'll be happy to share the key to unlock the full potential of this amazing creation. 🔓

## 🔴 Get LLMs official API at affordable price
Give a ping on [Telegram](https://t.me/yesbhautik) | [WhatsApp](https://wa.me/+916353586391) 

## 📦 Code Distribution
| Features | FREE | PRIME |
| ----- | ----- | ----- |
| Encrypted code (no changes in functionality) | ✅ | ❌ |
| History mode | ❌ | ✅ |
| Prime Support | ❌ | ✅ |
| Customizable | ❌ | ✅ |
| DALL-E 3 with resolution Mods | ❌ | ✅ |
| GPT4 | ❌ | ✅ |
| Decrypted code | ❌ | ✅ |
| Regular Updates | ❌ | ✅ |
| Exclusive API offers | ❌ | ✅ |
| Commercial allowed licence | ❌ | ✅ |

### Get access to [PRIME REPO](https://pages.razorpay.com/Whatsapp-Ai-BOT)

## 🚀 Getting Started
>  Get an OpenAI API Key by creating an account [here](https://go.yesbhautik.co.in/l76e5p). 

Replace the API Key in the `key.json` file. 

## Deployment Documentation
### [Windows](https://github.com/yesbhautik/Whatsapp-Ai-BOT/blob/main/Docs/Deployment/Windows.md)

### [Linux](https://github.com/yesbhautik/Whatsapp-Ai-BOT/blob/main/Docs/Deployment/Linux.md)

### [MacOS](https://github.com/yesbhautik/Whatsapp-Ai-BOT/blob/main/Docs/Deployment/MacOS.md) 
### [Android/Termux](https://github.com/yesbhautik/Whatsapp-Ai-BOT/blob/main/Docs/Deployment/Android.md)

## ![Donate](youtube.png "")


To learn more about this AI WhatsApp bot and its features, you can watch the tutorial videos on my YouTube channel. Visit [here](https://youtu.be/4lk6IMZ544s) to access the videos.

## Contributing 🤝
Contributions are welcome! Please follow these steps to contribute to the project:

>  Fork the repository🍴 

Create a new branch for your feature or bug fix 🌿 

Make your changes and commit them 💻 

Push your changes to your fork 🚀 

Create a pull request to the main repository 📥 
 

## 🔥 Show some support | Donation
If you find this repository helpful, show your support by giving it a 🌟! Your support means a lot to me and helps me keep contributing to the open-source community.

Also, if you'd like to support & motivate me for hard work, you can do so via my donation link: [https://rzp.io/l/Whatsapp-Ai-BOT](https://rzp.io/l/Whatsapp-Ai-BOT)



## 💬 Let's Connect
Feel free to reach out to us if you have questions, ideas, or simply want to chat. We're here to help and connect with the community. 

[Website](https://yesbhautik.co.in/) | [YesbhautikX](https://yesbhautikx.co.in/) | [LinkedIn](https://www.linkedin.com/in/yesbhautik) | [GitHub](https://github.com/yesbhautik) 

## 📜 License
This repository is licensed under a [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License](http://creativecommons.org/licenses/by-nc-sa/4.0/). For more information, see the [LICENSE](LICENSE) file.



<!--- Eraser file: https://app.eraser.io/workspace/yaybhl5onK6i8JeUiGxJ --->


================================================
FILE: example.key.json
================================================
{
  "keyopenai": "OPENAI_API_KEY",
  "donate": "Support WhatsApp-Ai-BOT Project and in return, get exclusive access to PRIME version. https://rzp.io/l/Whatsapp-Ai-BOT"
}

================================================
FILE: index.js
================================================
function _0x4f7b(_0x260f88, _0x270b96) {
  const _0x5ea8eb = _0x5ea8();
  return (
    (_0x4f7b = function (_0x4f7b5e, _0x41a01f) {
      _0x4f7b5e = _0x4f7b5e - 0x192;
      let _0x5aa78b = _0x5ea8eb[_0x4f7b5e];
      return _0x5aa78b;
    }),
    _0x4f7b(_0x260f88, _0x270b96)
  );
}
const _0x4003d6 = _0x4f7b;
(function (_0x1cc439, _0x99636c) {
  const _0x109c7f = _0x4f7b,
    _0xda7897 = _0x1cc439();
  while (!![]) {
    try {
      const _0x18c644 =
        (parseInt(_0x109c7f(0x1fc)) / 0x1) *
          (parseInt(_0x109c7f(0x19a)) / 0x2) +
        parseInt(_0x109c7f(0x1de)) / 0x3 +
        -parseInt(_0x109c7f(0x1c0)) / 0x4 +
        -parseInt(_0x109c7f(0x21e)) / 0x5 +
        (parseInt(_0x109c7f(0x1b3)) / 0x6) *
          (-parseInt(_0x109c7f(0x193)) / 0x7) +
        (parseInt(_0x109c7f(0x201)) / 0x8) *
          (-parseInt(_0x109c7f(0x1b5)) / 0x9) +
        parseInt(_0x109c7f(0x1c9)) / 0xa;
      if (_0x18c644 === _0x99636c) break;
      else _0xda7897["push"](_0xda7897["shift"]());
    } catch (_0x5e992d) {
      _0xda7897["push"](_0xda7897["shift"]());
    }
  }
})(_0x5ea8, 0xc9022);
const sessionName = "Yesbhautik",
  donet = _0x4003d6(0x205),
  owner = [_0x4003d6(0x1e1)],
  {
    default: yesbhautikaiConnect,
    useMultiFileAuthState,
    DisconnectReason,
    fetchLatestBaileysVersion,
    makeInMemoryStore,
    jidDecode,
    proto,
    getContentType,
    Browsers,
    fetchLatestWaWebVersion,
  } = require(_0x4003d6(0x213)),
  pino = require("pino"),
  { Boom } = require("@hapi/boom"),
  fs = require("fs"),
  axios = require(_0x4003d6(0x221)),
  chalk = require(_0x4003d6(0x1e7)),
  figlet = require(_0x4003d6(0x1ed)),
  _ = require(_0x4003d6(0x214)),
  PhoneNumber = require("awesome-phonenumber"),
  store = makeInMemoryStore({
    logger: pino()[_0x4003d6(0x1aa)]({
      level: _0x4003d6(0x20e),
      stream: _0x4003d6(0x212),
    }),
  }),
  color = (_0x50bd69, _0x66a585) => {
    const _0x3aa087 = _0x4003d6;
    return !_0x66a585
      ? chalk[_0x3aa087(0x1e8)](_0x50bd69)
      : chalk[_0x3aa087(0x1f1)](_0x66a585)(_0x50bd69);
  };
function smsg(_0x1ac937, _0x3e6a42, _0xd50a88) {
  const _0x57788a = _0x4003d6;
  if (!_0x3e6a42) return _0x3e6a42;
  let _0x533f62 = proto[_0x57788a(0x20c)];
  if (_0x3e6a42[_0x57788a(0x1f0)]) {
    (_0x3e6a42["id"] = _0x3e6a42[_0x57788a(0x1f0)]["id"]),
      (_0x3e6a42[_0x57788a(0x1e9)] =
        _0x3e6a42["id"][_0x57788a(0x1dc)](_0x57788a(0x1bf)) &&
        _0x3e6a42["id"][_0x57788a(0x1a7)] === 0x10),
      (_0x3e6a42[_0x57788a(0x1f2)] = _0x3e6a42["key"]["remoteJid"]),
      (_0x3e6a42[_0x57788a(0x1a2)] = _0x3e6a42["key"][_0x57788a(0x1a2)]),
      (_0x3e6a42[_0x57788a(0x1cc)] = _0x3e6a42["chat"]["endsWith"](
        _0x57788a(0x194)
      )),
      (_0x3e6a42[_0x57788a(0x1f9)] = _0x1ac937[_0x57788a(0x1d2)](
        (_0x3e6a42["fromMe"] && _0x1ac937["user"]["id"]) ||
          _0x3e6a42[_0x57788a(0x217)] ||
          _0x3e6a42[_0x57788a(0x1f0)]["participant"] ||
          _0x3e6a42[_0x57788a(0x1f2)] ||
          ""
      ));
    if (_0x3e6a42["isGroup"])
      _0x3e6a42[_0x57788a(0x217)] =
        _0x1ac937[_0x57788a(0x1d2)](_0x3e6a42["key"]["participant"]) || "";
  }
  if (_0x3e6a42[_0x57788a(0x1c1)]) {
    (_0x3e6a42[_0x57788a(0x1ab)] = getContentType(_0x3e6a42[_0x57788a(0x1c1)])),
      (_0x3e6a42[_0x57788a(0x1fe)] =
        _0x3e6a42[_0x57788a(0x1ab)] == _0x57788a(0x1d0)
          ? _0x3e6a42[_0x57788a(0x1c1)][_0x3e6a42[_0x57788a(0x1ab)]]["message"][
              getContentType(
                _0x3e6a42[_0x57788a(0x1c1)][_0x3e6a42[_0x57788a(0x1ab)]][
                  _0x57788a(0x1c1)
                ]
              )
            ]
          : _0x3e6a42["message"][_0x3e6a42[_0x57788a(0x1ab)]]),
      (_0x3e6a42[_0x57788a(0x19b)] =
        _0x3e6a42[_0x57788a(0x1c1)]["conversation"] ||
        _0x3e6a42[_0x57788a(0x1fe)][_0x57788a(0x19e)] ||
        _0x3e6a42[_0x57788a(0x1fe)]["text"] ||
        (_0x3e6a42[_0x57788a(0x1ab)] == _0x57788a(0x1e6) &&
          _0x3e6a42["msg"][_0x57788a(0x1c3)][_0x57788a(0x1bd)]) ||
        (_0x3e6a42["mtype"] == _0x57788a(0x1f4) &&
          _0x3e6a42[_0x57788a(0x1fe)]["selectedButtonId"]) ||
        (_0x3e6a42[_0x57788a(0x1ab)] == _0x57788a(0x1d0) &&
          _0x3e6a42["msg"][_0x57788a(0x19e)]) ||
        _0x3e6a42["text"]);
    let _0x1832d0 = (_0x3e6a42[_0x57788a(0x200)] = _0x3e6a42[_0x57788a(0x1fe)][
      _0x57788a(0x1b0)
    ]
      ? _0x3e6a42[_0x57788a(0x1fe)][_0x57788a(0x1b0)][_0x57788a(0x1a1)]
      : null);
    _0x3e6a42[_0x57788a(0x220)] = _0x3e6a42["msg"][_0x57788a(0x1b0)]
      ? _0x3e6a42[_0x57788a(0x1fe)]["contextInfo"][_0x57788a(0x220)]
      : [];
    if (_0x3e6a42[_0x57788a(0x200)]) {
      let _0xbc61e8 = getContentType(_0x1832d0);
      _0x3e6a42[_0x57788a(0x200)] = _0x3e6a42[_0x57788a(0x200)][_0xbc61e8];
      [_0x57788a(0x20a)]["includes"](_0xbc61e8) &&
        ((_0xbc61e8 = getContentType(_0x3e6a42["quoted"])),
        (_0x3e6a42[_0x57788a(0x200)] = _0x3e6a42[_0x57788a(0x200)][_0xbc61e8]));
      if (typeof _0x3e6a42[_0x57788a(0x200)] === _0x57788a(0x1ef))
        _0x3e6a42[_0x57788a(0x200)] = { text: _0x3e6a42[_0x57788a(0x200)] };
      (_0x3e6a42[_0x57788a(0x200)][_0x57788a(0x1ab)] = _0xbc61e8),
        (_0x3e6a42[_0x57788a(0x200)]["id"] =
          _0x3e6a42[_0x57788a(0x1fe)]["contextInfo"][_0x57788a(0x1be)]),
        (_0x3e6a42[_0x57788a(0x200)]["chat"] =
          _0x3e6a42[_0x57788a(0x1fe)][_0x57788a(0x1b0)][_0x57788a(0x216)] ||
          _0x3e6a42[_0x57788a(0x1f2)]),
        (_0x3e6a42["quoted"][_0x57788a(0x1e9)] = _0x3e6a42[_0x57788a(0x200)][
          "id"
        ]
          ? _0x3e6a42[_0x57788a(0x200)]["id"][_0x57788a(0x1dc)]("BAE5") &&
            _0x3e6a42["quoted"]["id"][_0x57788a(0x1a7)] === 0x10
          : ![]),
        (_0x3e6a42[_0x57788a(0x200)][_0x57788a(0x1f9)] = _0x1ac937["decodeJid"](
          _0x3e6a42[_0x57788a(0x1fe)][_0x57788a(0x1b0)][_0x57788a(0x217)]
        )),
        (_0x3e6a42["quoted"][_0x57788a(0x1a2)] =
          _0x3e6a42[_0x57788a(0x200)]["sender"] ===
          _0x1ac937[_0x57788a(0x1d2)](_0x1ac937[_0x57788a(0x20d)]["id"])),
        (_0x3e6a42[_0x57788a(0x200)]["text"] =
          _0x3e6a42[_0x57788a(0x200)]["text"] ||
          _0x3e6a42[_0x57788a(0x200)]["caption"] ||
          _0x3e6a42[_0x57788a(0x200)][_0x57788a(0x1c6)] ||
          _0x3e6a42[_0x57788a(0x200)][_0x57788a(0x209)] ||
          _0x3e6a42[_0x57788a(0x200)][_0x57788a(0x203)] ||
          _0x3e6a42[_0x57788a(0x200)][_0x57788a(0x1e0)] ||
          ""),
        (_0x3e6a42["quoted"][_0x57788a(0x220)] = _0x3e6a42[_0x57788a(0x1fe)][
          "contextInfo"
        ]
          ? _0x3e6a42["msg"][_0x57788a(0x1b0)]["mentionedJid"]
          : []),
        (_0x3e6a42[_0x57788a(0x1a9)] = _0x3e6a42[_0x57788a(0x1ac)] =
          async () => {
            const _0x4a86e5 = _0x57788a;
            if (!_0x3e6a42[_0x4a86e5(0x200)]["id"]) return ![];
            let _0x3d8d39 = await _0xd50a88[_0x4a86e5(0x1b7)](
              _0x3e6a42[_0x4a86e5(0x1f2)],
              _0x3e6a42[_0x4a86e5(0x200)]["id"],
              _0x1ac937
            );
            return exports[_0x4a86e5(0x1b9)](_0x1ac937, _0x3d8d39, _0xd50a88);
          });
      let _0x5b03c3 = (_0x3e6a42["quoted"][_0x57788a(0x1a0)] = _0x533f62[
        _0x57788a(0x1af)
      ]({
        key: {
          remoteJid: _0x3e6a42[_0x57788a(0x200)][_0x57788a(0x1f2)],
          fromMe: _0x3e6a42["quoted"]["fromMe"],
          id: _0x3e6a42[_0x57788a(0x200)]["id"],
        },
        message: _0x1832d0,
        ...(_0x3e6a42["isGroup"]
          ? { participant: _0x3e6a42[_0x57788a(0x200)]["sender"] }
          : {}),
      }));
      (_0x3e6a42["quoted"][_0x57788a(0x1cf)] = () =>
        _0x1ac937[_0x57788a(0x1ae)](
          _0x3e6a42[_0x57788a(0x200)][_0x57788a(0x1f2)],
          { delete: _0x5b03c3[_0x57788a(0x1f0)] }
        )),
        (_0x3e6a42[_0x57788a(0x200)][_0x57788a(0x19c)] = (
          _0xcf095c,
          _0x284131 = ![],
          _0x27765b = {}
        ) =>
          _0x1ac937["copyNForward"](
            _0xcf095c,
            _0x5b03c3,
            _0x284131,
            _0x27765b
          )),
        (_0x3e6a42[_0x57788a(0x200)][_0x57788a(0x21f)] = () =>
          _0x1ac937[_0x57788a(0x198)](_0x3e6a42[_0x57788a(0x200)]));
    }
  }
  if (_0x3e6a42[_0x57788a(0x1fe)][_0x57788a(0x1fd)])
    _0x3e6a42["download"] = () =>
      _0x1ac937[_0x57788a(0x198)](_0x3e6a42[_0x57788a(0x1fe)]);
  return (
    (_0x3e6a42[_0x57788a(0x215)] =
      _0x3e6a42[_0x57788a(0x1fe)]["text"] ||
      _0x3e6a42["msg"][_0x57788a(0x19e)] ||
      _0x3e6a42[_0x57788a(0x1c1)][_0x57788a(0x1c6)] ||
      _0x3e6a42["msg"][_0x57788a(0x209)] ||
      _0x3e6a42["msg"][_0x57788a(0x203)] ||
      _0x3e6a42[_0x57788a(0x1fe)][_0x57788a(0x1e0)] ||
      ""),
    (_0x3e6a42[_0x57788a(0x1d4)] = (
      _0x443444,
      _0x3392a5 = _0x3e6a42[_0x57788a(0x1f2)],
      _0x16c97a = {}
    ) =>
      Buffer[_0x57788a(0x1c7)](_0x443444)
        ? _0x1ac937[_0x57788a(0x224)](
            _0x3392a5,
            _0x443444,
            "file",
            "",
            _0x3e6a42,
            { ..._0x16c97a }
          )
        : _0x1ac937[_0x57788a(0x1ee)](_0x3392a5, _0x443444, _0x3e6a42, {
            ..._0x16c97a,
          })),
    (_0x3e6a42["copy"] = () =>
      exports[_0x57788a(0x1b9)](
        _0x1ac937,
        _0x533f62["fromObject"](_0x533f62[_0x57788a(0x1e5)](_0x3e6a42))
      )),
    (_0x3e6a42["copyNForward"] = (
      _0x14651c = _0x3e6a42["chat"],
      _0x373a84 = ![],
      _0xf90ae3 = {}
    ) =>
      _0x1ac937[_0x57788a(0x19c)](_0x14651c, _0x3e6a42, _0x373a84, _0xf90ae3)),
    _0x3e6a42
  );
}
function _0x5ea8() {
  const _0x15aa9b = [
    "error",
    "singleSelectReply",
    "@broadcast",
    "groupAcceptInvite",
    "conversation",
    "isBuffer",
    "default",
    "34541740TPadze",
    "set",
    "base64",
    "isGroup",
    "international",
    "open",
    "delete",
    "viewOnceMessage",
    "Connection\x20closed,\x20reconnecting....",
    "decodeJid",
    "Type\x20/menu\x20to\x20see\x20menu",
    "reply",
    "groupMetadata",
    "Device\x20Logged\x20Out,\x20Please\x20Delete\x20Folder\x20Session\x20yusril\x20and\x20Scan\x20Again.",
    "Connection\x20Lost\x20from\x20Server,\x20reconnecting...",
    "cMod",
    "Yesbhautik",
    "contacts.update",
    "cache",
    "startsWith",
    "2.1.0",
    "3355227jcppqF",
    "getNumber",
    "title",
    "916353586391",
    "keys",
    "split",
    "includes",
    "toObject",
    "listResponseMessage",
    "chalk",
    "green",
    "isBaileys",
    "yellow",
    "alloc",
    "WhatsApp",
    "figlet",
    "sendText",
    "string",
    "key",
    "keyword",
    "chat",
    "badSession",
    "buttonsResponseMessage",
    "@s.whatsapp.net",
    "getName",
    "public",
    "subject",
    "sender",
    "serializeM",
    "close",
    "3kSsfMy",
    "url",
    "msg",
    "redBright",
    "quoted",
    "64bmSpGg",
    "verifiedName",
    "selectedDisplayText",
    "connectionClosed",
    "https://rzp.io/l/Whatsapp-Ai-BOT",
    "connectionReplaced",
    "output",
    "catch",
    "contentText",
    "productMessage",
    "from",
    "WebMessageInfo",
    "user",
    "silent",
    "0@s.whatsapp.net",
    "exit",
    "Bot\x20success\x20conneted\x20to\x20server",
    "store",
    "@whiskeysockets/baileys",
    "lodash",
    "text",
    "remoteJid",
    "participant",
    "Bot\x20started!\x0a\x0aSupport\x20WhatsApp-Ai-BOT\x20Project\x20and\x20in\x20return,\x20get\x20exclusive\x20access\x20to\x20PRIME\x20version.\x0a",
    "server",
    "status",
    "Support\x20WhatsApp-Ai-BOT\x20Project\x20and\x20in\x20return,\x20get\x20exclusive\x20access\x20to\x20PRIME\x20version.\x20https://rzp.io/l/Whatsapp-Ai-BOT",
    "unwatchFile",
    "reason:",
    "6245705KkzZQZ",
    "download",
    "mentionedJid",
    "axios",
    "Standard",
    "Whatsapp-Ai-Bot\x20-\x20YesbhautikX",
    "sendMedia",
    "watchFile",
    "3605YpVTNx",
    "@g.us",
    "session",
    "utf-8",
    "arraybuffer",
    "downloadMediaMessage",
    "test",
    "328242qlpMOr",
    "body",
    "copyNForward",
    "Caught\x20exception:\x20",
    "caption",
    "notify",
    "fakeObj",
    "quotedMessage",
    "fromMe",
    "Restart\x20Required,\x20Restarting...",
    "Something\x20went\x20wrong",
    "bind",
    "withoutContact",
    "length",
    "join",
    "getQuotedObj",
    "child",
    "mtype",
    "getQuotedMessage",
    "log",
    "sendMessage",
    "fromObject",
    "contextInfo",
    "ephemeralMessage",
    "existsSync",
    "14154CaIsid",
    "timedOut",
    "1328283VHDVAQ",
    "Unhandled\x20Rejection\x20at:",
    "loadMessage",
    "name",
    "smsg",
    "restartRequired",
    "contacts",
    "DoV9wBztYVJ2aMAJ5rzrsO",
    "selectedRowId",
    "stanzaId",
    "BAE5",
    "2387576tuOszu",
    "message",
  ];
  _0x5ea8 = function () {
    return _0x15aa9b;
  };
  return _0x5ea8();
}
async function startHisoka() {
  const _0x5cdae0 = _0x4003d6,
    { state: _0x889194, saveCreds: _0x6f4dc8 } = await useMultiFileAuthState(
      "./" + (sessionName ? sessionName : _0x5cdae0(0x195))
    ),
    { version: _0x33d4eb, isLatest: _0x327f92 } =
      await fetchLatestWaWebVersion()[_0x5cdae0(0x208)](() =>
        fetchLatestBaileysVersion()
      );
  console[_0x5cdae0(0x1ad)](
    "using\x20WA\x20v" +
      _0x33d4eb[_0x5cdae0(0x1a8)](".") +
      ",\x20isLatest:\x20" +
      _0x327f92
  ),
    console[_0x5cdae0(0x1ad)](
      color(
        figlet["textSync"](_0x5cdae0(0x1d9), {
          font: _0x5cdae0(0x222),
          horizontalLayout: _0x5cdae0(0x1c8),
          vertivalLayout: _0x5cdae0(0x1c8),
          whitespaceBreak: ![],
        }),
        _0x5cdae0(0x1e8)
      )
    );
  const _0x17b6e8 = yesbhautikaiConnect({
    logger: pino({ level: _0x5cdae0(0x20e) }),
    printQRInTerminal: !![],
    browser: [_0x5cdae0(0x223), "Browser", _0x5cdae0(0x1dd)],
    auth: _0x889194,
  });
  store[_0x5cdae0(0x1a5)](_0x17b6e8["ev"]),
    _0x17b6e8["ev"]["on"]("messages.upsert", async (_0x8cd59c) => {
      const _0x4f3d8d = _0x5cdae0;
      try {
        mek = _0x8cd59c["messages"][0x0];
        if (!mek[_0x4f3d8d(0x1c1)]) return;
        mek[_0x4f3d8d(0x1c1)] =
          Object[_0x4f3d8d(0x1e2)](mek[_0x4f3d8d(0x1c1)])[0x0] ===
          _0x4f3d8d(0x1b1)
            ? mek[_0x4f3d8d(0x1c1)][_0x4f3d8d(0x1b1)][_0x4f3d8d(0x1c1)]
            : mek[_0x4f3d8d(0x1c1)];
        if (
          mek[_0x4f3d8d(0x1f0)] &&
          mek[_0x4f3d8d(0x1f0)][_0x4f3d8d(0x216)] === "status@broadcast"
        )
          return;
        if (
          !_0x17b6e8[_0x4f3d8d(0x1f7)] &&
          !mek[_0x4f3d8d(0x1f0)][_0x4f3d8d(0x1a2)] &&
          _0x8cd59c["type"] === _0x4f3d8d(0x19f)
        )
          return;
        if (
          mek["key"]["id"][_0x4f3d8d(0x1dc)]("BAE5") &&
          mek["key"]["id"][_0x4f3d8d(0x1a7)] === 0x10
        )
          return;
        (m = smsg(_0x17b6e8, mek, store)),
          require("./yesbhautikai")(_0x17b6e8, m, _0x8cd59c, store);
      } catch (_0xc1f942) {
        console[_0x4f3d8d(0x1ad)](_0xc1f942);
      }
    });
  const _0x114dee = new Map();
  process["on"]("unhandledRejection", (_0x1e2d7a, _0x571d5e) => {
    const _0x1dadb5 = _0x5cdae0;
    _0x114dee[_0x1dadb5(0x1ca)](_0x571d5e, _0x1e2d7a),
      console[_0x1dadb5(0x1ad)](
        _0x1dadb5(0x1b6),
        _0x571d5e,
        _0x1dadb5(0x21d),
        _0x1e2d7a
      );
  }),
    process["on"]("rejectionHandled", (_0x58f15b) => {
      const _0xcdbee9 = _0x5cdae0;
      _0x114dee[_0xcdbee9(0x1cf)](_0x58f15b);
    }),
    process["on"](_0x5cdae0(0x1a4), function (_0x5e1745) {
      const _0x2e6542 = _0x5cdae0;
      console[_0x2e6542(0x1ad)](_0x2e6542(0x19d), _0x5e1745);
    }),
    (_0x17b6e8[_0x5cdae0(0x1d2)] = (_0xb8669f) => {
      const _0x46fffe = _0x5cdae0;
      if (!_0xb8669f) return _0xb8669f;
      if (/:\d+@/gi[_0x46fffe(0x199)](_0xb8669f)) {
        let _0x23f159 = jidDecode(_0xb8669f) || {};
        return (
          (_0x23f159[_0x46fffe(0x20d)] &&
            _0x23f159["server"] &&
            _0x23f159[_0x46fffe(0x20d)] + "@" + _0x23f159[_0x46fffe(0x219)]) ||
          _0xb8669f
        );
      } else return _0xb8669f;
    }),
    _0x17b6e8["ev"]["on"](_0x5cdae0(0x1da), (_0x537d9e) => {
      const _0x51ec0e = _0x5cdae0;
      for (let _0x1e6608 of _0x537d9e) {
        let _0x18618c = _0x17b6e8[_0x51ec0e(0x1d2)](_0x1e6608["id"]);
        if (store && store[_0x51ec0e(0x1bb)])
          store["contacts"][_0x18618c] = {
            id: _0x18618c,
            name: _0x1e6608[_0x51ec0e(0x19f)],
          };
      }
    }),
    (_0x17b6e8[_0x5cdae0(0x1f6)] = (_0x307648, _0x3b5c82 = ![]) => {
      const _0x5a6c4f = _0x5cdae0;
      (id = _0x17b6e8[_0x5a6c4f(0x1d2)](_0x307648)),
        (_0x3b5c82 = _0x17b6e8[_0x5a6c4f(0x1a6)] || _0x3b5c82);
      let _0x3aadd9;
      if (id["endsWith"](_0x5a6c4f(0x194)))
        return new Promise(async (_0x29172e) => {
          const _0x384e02 = _0x5a6c4f;
          _0x3aadd9 = store[_0x384e02(0x1bb)][id] || {};
          if (!(_0x3aadd9[_0x384e02(0x1b8)] || _0x3aadd9[_0x384e02(0x1f8)]))
            _0x3aadd9 = _0x17b6e8[_0x384e02(0x1d5)](id) || {};
          _0x29172e(
            _0x3aadd9[_0x384e02(0x1b8)] ||
              _0x3aadd9[_0x384e02(0x1f8)] ||
              PhoneNumber("+" + id["replace"](_0x384e02(0x1f5), ""))[
                _0x384e02(0x1df)
              ](_0x384e02(0x1cd))
          );
        });
      else
        _0x3aadd9 =
          id === _0x5a6c4f(0x20f)
            ? { id: id, name: _0x5a6c4f(0x1ec) }
            : id ===
              _0x17b6e8[_0x5a6c4f(0x1d2)](_0x17b6e8[_0x5a6c4f(0x20d)]["id"])
            ? _0x17b6e8[_0x5a6c4f(0x20d)]
            : store["contacts"][id] || {};
      return (
        (_0x3b5c82 ? "" : _0x3aadd9["name"]) ||
        _0x3aadd9["subject"] ||
        _0x3aadd9[_0x5a6c4f(0x202)] ||
        PhoneNumber("+" + _0x307648["replace"](_0x5a6c4f(0x1f5), ""))[
          _0x5a6c4f(0x1df)
        ](_0x5a6c4f(0x1cd))
      );
    }),
    (_0x17b6e8["setStatus"] = (_0xf621e5) => {
      const _0x310548 = _0x5cdae0;
      return (
        _0x17b6e8["query"]({
          tag: "iq",
          attrs: {
            to: _0x310548(0x1f5),
            type: _0x310548(0x1ca),
            xmlns: _0x310548(0x21a),
          },
          content: [
            {
              tag: _0x310548(0x21a),
              attrs: {},
              content: Buffer[_0x310548(0x20b)](_0xf621e5, _0x310548(0x196)),
            },
          ],
        }),
        _0xf621e5
      );
    }),
    (_0x17b6e8[_0x5cdae0(0x1f7)] = !![]),
    (_0x17b6e8[_0x5cdae0(0x1fa)] = (_0x537a00) =>
      smsg(_0x17b6e8, _0x537a00, store)),
    _0x17b6e8["ev"]["on"]("connection.update", async (_0x3627ed) => {
      const _0xd26331 = _0x5cdae0,
        { connection: _0x966e83, lastDisconnect: _0x1753f2 } = _0x3627ed;
      if (_0x966e83 === _0xd26331(0x1fb)) {
        let _0x15d475 = new Boom(_0x1753f2?.[_0xd26331(0x1c2)])?.[
          _0xd26331(0x207)
        ]["statusCode"];
        if (_0x15d475 === DisconnectReason[_0xd26331(0x1f3)])
          console[_0xd26331(0x1ad)](
            "Bad\x20Session\x20File,\x20Please\x20Delete\x20Session\x20and\x20Scan\x20Again"
          ),
            process[_0xd26331(0x210)]();
        else {
          if (_0x15d475 === DisconnectReason[_0xd26331(0x204)])
            console[_0xd26331(0x1ad)](_0xd26331(0x1d1)), startHisoka();
          else {
            if (_0x15d475 === DisconnectReason["connectionLost"])
              console[_0xd26331(0x1ad)](_0xd26331(0x1d7)), startHisoka();
            else {
              if (_0x15d475 === DisconnectReason[_0xd26331(0x206)])
                console["log"](
                  "Connection\x20Replaced,\x20Another\x20New\x20Session\x20Opened,\x20Please\x20Restart\x20Bot"
                ),
                  process["exit"]();
              else {
                if (_0x15d475 === DisconnectReason["loggedOut"])
                  console[_0xd26331(0x1ad)](_0xd26331(0x1d6)),
                    process["exit"]();
                else {
                  if (_0x15d475 === DisconnectReason[_0xd26331(0x1ba)])
                    console["log"](_0xd26331(0x1a3)), startHisoka();
                  else
                    _0x15d475 === DisconnectReason[_0xd26331(0x1b4)]
                      ? (console[_0xd26331(0x1ad)](
                          "Connection\x20TimedOut,\x20Reconnecting..."
                        ),
                        startHisoka())
                      : (console[_0xd26331(0x1ad)](
                          "Unknown\x20DisconnectReason:\x20" +
                            _0x15d475 +
                            "|" +
                            _0x966e83
                        ),
                        startHisoka());
                }
              }
            }
          }
        }
      } else {
        if (_0x966e83 === _0xd26331(0x1ce)) {
          console["log"](color(_0xd26331(0x211), "green")),
            console["log"](color(_0xd26331(0x21b), _0xd26331(0x1ea))),
            console[_0xd26331(0x1ad)](color(_0xd26331(0x1d3))),
            _0x17b6e8[_0xd26331(0x1ae)](owner + _0xd26331(0x1f5), {
              text: _0xd26331(0x218) + donet,
            });
          const _0x5ee741 = _0xd26331(0x1bc);
          _0x17b6e8[_0xd26331(0x1c5)](_0x5ee741)
            ["then"]((_0x4e6a40) =>
              console[_0xd26331(0x1ad)](
                "Joined\x20the\x20group\x20with\x20response:\x20" + _0x4e6a40
              )
            )
            ["catch"]((_0x192ac7) =>
              console[_0xd26331(0x1c2)](
                "Failed\x20to\x20join\x20the\x20group:\x20" + _0x192ac7
              )
            );
        }
      }
    }),
    _0x17b6e8["ev"]["on"]("creds.update", _0x6f4dc8);
  const _0x5853c3 = async (_0x3b91a7, _0x16ef30) => {
    const _0xdcbc86 = _0x5cdae0;
    try {
      _0x16ef30 ? _0x16ef30 : {};
      const _0x52bbdb = await axios({
        method: "get",
        url: _0x3b91a7,
        headers: { DNT: 0x1, "Upgrade-Insecure-Request": 0x1 },
        ..._0x16ef30,
        responseType: _0xdcbc86(0x197),
      });
      return _0x52bbdb["data"];
    } catch (_0x1681ed) {
      return _0x1681ed;
    }
  };
  return (
    (_0x17b6e8["sendImage"] = async (
      _0x99b4e3,
      _0x5b9a08,
      _0x3a5789 = "",
      _0x39f640 = "",
      _0x42a54c
    ) => {
      const _0x1506ea = _0x5cdae0;
      let _0x9cdca4 = Buffer[_0x1506ea(0x1c7)](_0x5b9a08)
        ? _0x5b9a08
        : /^data:.*?\/.*?;base64,/i[_0x1506ea(0x199)](_0x5b9a08)
        ? Buffer[_0x1506ea(0x20b)](
            _0x5b9a08[_0x1506ea(0x1e3)]`,`[0x1],
            _0x1506ea(0x1cb)
          )
        : /^https?:\/\//["test"](_0x5b9a08)
        ? await await _0x5853c3(_0x5b9a08)
        : fs[_0x1506ea(0x1b2)](_0x5b9a08)
        ? fs["readFileSync"](_0x5b9a08)
        : Buffer[_0x1506ea(0x1eb)](0x0);
      return await _0x17b6e8[_0x1506ea(0x1ae)](
        _0x99b4e3,
        { image: _0x9cdca4, caption: _0x3a5789, ..._0x42a54c },
        { quoted: _0x39f640 }
      );
    }),
    (_0x17b6e8[_0x5cdae0(0x1ee)] = (
      _0x9bb3b3,
      _0x1fbc8d,
      _0xc0b7d2 = "",
      _0x52813e
    ) =>
      _0x17b6e8[_0x5cdae0(0x1ae)](
        _0x9bb3b3,
        { text: _0x1fbc8d, ..._0x52813e },
        { quoted: _0xc0b7d2 }
      )),
    (_0x17b6e8[_0x5cdae0(0x1d8)] = (
      _0xca3d31,
      _0x46ece5,
      _0x4b8316 = "",
      _0x2decd = _0x17b6e8["user"]["id"],
      _0x9e0cd = {}
    ) => {
      const _0x5d1184 = _0x5cdae0;
      let _0x618bd3 = Object[_0x5d1184(0x1e2)](_0x46ece5["message"])[0x0],
        _0x16edc4 = _0x618bd3 === _0x5d1184(0x1b1);
      _0x16edc4 &&
        (_0x618bd3 = Object[_0x5d1184(0x1e2)](
          _0x46ece5[_0x5d1184(0x1c1)][_0x5d1184(0x1b1)][_0x5d1184(0x1c1)]
        )[0x0]);
      let _0x14ece9 = _0x16edc4
          ? _0x46ece5["message"]["ephemeralMessage"][_0x5d1184(0x1c1)]
          : _0x46ece5[_0x5d1184(0x1c1)],
        _0x2e2707 = _0x14ece9[_0x618bd3];
      if (typeof _0x2e2707 === _0x5d1184(0x1ef))
        _0x14ece9[_0x618bd3] = _0x4b8316 || _0x2e2707;
      else {
        if (_0x2e2707[_0x5d1184(0x19e)])
          _0x2e2707[_0x5d1184(0x19e)] =
            _0x4b8316 || _0x2e2707[_0x5d1184(0x19e)];
        else {
          if (_0x2e2707[_0x5d1184(0x215)])
            _0x2e2707["text"] = _0x4b8316 || _0x2e2707[_0x5d1184(0x215)];
        }
      }
      if (typeof _0x2e2707 !== _0x5d1184(0x1ef))
        _0x14ece9[_0x618bd3] = { ..._0x2e2707, ..._0x9e0cd };
      if (_0x46ece5["key"][_0x5d1184(0x217)])
        _0x2decd = _0x46ece5[_0x5d1184(0x1f0)][_0x5d1184(0x217)] =
          _0x2decd || _0x46ece5[_0x5d1184(0x1f0)][_0x5d1184(0x217)];
      else {
        if (_0x46ece5[_0x5d1184(0x1f0)]["participant"])
          _0x2decd = _0x46ece5[_0x5d1184(0x1f0)][_0x5d1184(0x217)] =
            _0x2decd || _0x46ece5[_0x5d1184(0x1f0)]["participant"];
      }
      if (
        _0x46ece5["key"][_0x5d1184(0x216)][_0x5d1184(0x1e4)]("@s.whatsapp.net")
      )
        _0x2decd = _0x2decd || _0x46ece5[_0x5d1184(0x1f0)][_0x5d1184(0x216)];
      else {
        if (_0x46ece5["key"]["remoteJid"][_0x5d1184(0x1e4)](_0x5d1184(0x1c4)))
          _0x2decd = _0x2decd || _0x46ece5[_0x5d1184(0x1f0)][_0x5d1184(0x216)];
      }
      return (
        (_0x46ece5[_0x5d1184(0x1f0)][_0x5d1184(0x216)] = _0xca3d31),
        (_0x46ece5[_0x5d1184(0x1f0)][_0x5d1184(0x1a2)] =
          _0x2decd === _0x17b6e8[_0x5d1184(0x20d)]["id"]),
        proto[_0x5d1184(0x20c)][_0x5d1184(0x1af)](_0x46ece5)
      );
    }),
    _0x17b6e8
  );
}
startHisoka();
let file = require["resolve"](__filename);
fs[_0x4003d6(0x192)](file, () => {
  const _0x3f35c7 = _0x4003d6;
  fs[_0x3f35c7(0x21c)](file),
    console[_0x3f35c7(0x1ad)](
      chalk[_0x3f35c7(0x1ff)]("Update\x20" + __filename)
    ),
    delete require[_0x3f35c7(0x1db)][file],
    require(file);
});


================================================
FILE: package.json
================================================
{
  "name": "Whatsapp-Ai-BOT",
  "version": "2.1.0",
  "description": "Whatsapp Ai Bot, developed BY Bhautik Bavadiya with YesbhautikX",
  "main": "index.js",
  "type": "commonjs",
  "scripts": {
    "start": "node index.js"
  },
  "keywords": [
    "termux",
    "Whatsapp-Ai-BOT",
    "whatsapp-openai",
    "whatsapp-openai",
    "whatsapp-bot",
    "whatsapp-baileys",
    "baileys-md",
    "bot-wa",
    "bot-md",
    "yesbhautik",
    "whatsapp-multi-device",
    "YesbhautikX"
  ],
  "base": "https://yesbhautik.co.in/",
  "author": "YESBHAUTIK",
  "license": "MIT",
  "dependencies": {
    "@hapi/boom": "^10.0.0",
    "@whiskeysockets/baileys": "^6.6.0",
    "awesome-phonenumber": "^2.64.0",
    "axios": "^1.3.4",
    "chalk": "^4.1.2",
    "crypto": "^1.0.1",
    "figlet": "^1.5.2",
    "fs": "0.0.1-security",
    "lodash": "^4.17.21",
    "openai": "^4.20.1",
    "pino": "^7.0.5",
    "qrcode-terminal": "^0.12.0",
    "util": "^0.12.4"
  },
  "directories": {
    "lib": "lib",
    "src": "src"
  },
  "repository": {
    "type": "git",
    "url": "git+https://github.com/yesbhautik/Whatsapp-Ai-BOT.git"
  },
  "bugs": {
    "url": "https://github.com/yesbhautik/Whatsapp-Ai-BOT/issues"
  },
  "homepage": "https://github.com/yesbhautik/Whatsapp-Ai-BOT#readme"
}


================================================
FILE: yesbhautikai.js
================================================
const _0x39e3e6 = _0x2987;
(function (_0x34eda4, _0x4ab326) {
  const _0x4ef61a = _0x2987,
    _0x5333ec = _0x34eda4();
  while (!![]) {
    try {
      const _0x119b60 =
        parseInt(_0x4ef61a(0x9d)) / 0x1 +
        (-parseInt(_0x4ef61a(0x86)) / 0x2) *
          (-parseInt(_0x4ef61a(0x9c)) / 0x3) +
        -parseInt(_0x4ef61a(0x96)) / 0x4 +
        (parseInt(_0x4ef61a(0x8f)) / 0x5) * (-parseInt(_0x4ef61a(0x9a)) / 0x6) +
        (-parseInt(_0x4ef61a(0x7b)) / 0x7) *
          (-parseInt(_0x4ef61a(0xc4)) / 0x8) +
        -parseInt(_0x4ef61a(0xae)) / 0x9 +
        (-parseInt(_0x4ef61a(0xba)) / 0xa) * (-parseInt(_0x4ef61a(0xb4)) / 0xb);
      if (_0x119b60 === _0x4ab326) break;
      else _0x5333ec["push"](_0x5333ec["shift"]());
    } catch (_0x5de297) {
      _0x5333ec["push"](_0x5333ec["shift"]());
    }
  }
})(_0x4195, 0xce1ca);
const {
    BufferJSON,
    WA_DEFAULT_EPHEMERAL,
    generateWAMessageFromContent,
    proto,
    generateWAMessageContent,
    generateWAMessage,
    prepareWAMessageMedia,
    areJidsSameUser,
    getContentType,
  } = require(_0x39e3e6(0x94)),
  fs = require("fs"),
  util = require("util"),
  chalk = require(_0x39e3e6(0xd1)),
  OpenAI = require("openai");
let setting = require(_0x39e3e6(0xc6));
const openai = new OpenAI({ apiKey: setting[_0x39e3e6(0xaa)] });
module[_0x39e3e6(0xda)] = yesbhautikai = async (
  _0x34e142,
  _0x5cbb01,
  _0x15882e
) => {
  const _0x56484c = _0x39e3e6;
  try {
    var _0x512345 =
      _0x5cbb01[_0x56484c(0x81)] === _0x56484c(0x8c)
        ? _0x5cbb01["message"][_0x56484c(0x8c)]
        : _0x5cbb01[_0x56484c(0x81)] == _0x56484c(0x7e)
        ? _0x5cbb01[_0x56484c(0xcf)][_0x56484c(0x7e)][_0x56484c(0x99)]
        : _0x5cbb01[_0x56484c(0x81)] == _0x56484c(0xa3)
        ? _0x5cbb01[_0x56484c(0xcf)]["videoMessage"][_0x56484c(0x99)]
        : _0x5cbb01[_0x56484c(0x81)] == _0x56484c(0xe1)
        ? _0x5cbb01[_0x56484c(0xcf)][_0x56484c(0xe1)][_0x56484c(0xc0)]
        : _0x5cbb01["mtype"] == _0x56484c(0xab)
        ? _0x5cbb01[_0x56484c(0xcf)][_0x56484c(0xab)][_0x56484c(0xca)]
        : _0x5cbb01[_0x56484c(0x81)] == "listResponseMessage"
        ? _0x5cbb01[_0x56484c(0xcf)][_0x56484c(0xce)]["singleSelectReply"][
            _0x56484c(0xa9)
          ]
        : _0x5cbb01[_0x56484c(0x81)] == _0x56484c(0xd7)
        ? _0x5cbb01["message"][_0x56484c(0xd7)]["selectedId"]
        : _0x5cbb01[_0x56484c(0x81)] === _0x56484c(0xc8)
        ? _0x5cbb01["message"][_0x56484c(0xab)]?.["selectedButtonId"] ||
          _0x5cbb01["message"][_0x56484c(0xce)]?.[_0x56484c(0x9b)][
            _0x56484c(0xa9)
          ] ||
          _0x5cbb01["text"]
        : "";
    if (_0x5cbb01["mtype"] === _0x56484c(0x7a)) return;
    var _0x52ffca =
        typeof _0x5cbb01[_0x56484c(0xc0)] == _0x56484c(0xa0)
          ? _0x5cbb01[_0x56484c(0xc0)]
          : "",
      _0x51fe27 = /^[\\/!#.]/gi["test"](_0x512345)
        ? _0x512345[_0x56484c(0x8d)](/^[\\/!#.]/gi)
        : "/";
    const _0x4c9947 = _0x512345[_0x56484c(0xd6)](_0x51fe27),
      _0x158081 = _0x512345["replace"](_0x51fe27, "")
        [_0x56484c(0xe5)]()
        ["split"](/ +/)
        [_0x56484c(0xb5)]()
        ["toLowerCase"](),
      _0x5b303f = _0x512345[_0x56484c(0xe5)]()
        [_0x56484c(0xcb)](/ +/)
        [_0x56484c(0x82)](0x1),
      _0x208872 = _0x5cbb01["pushName"] || "No\x20Name",
      _0x388b86 = await _0x34e142[_0x56484c(0xd2)](
        _0x34e142[_0x56484c(0xd0)]["id"]
      ),
      _0x5654b1 = _0x5cbb01[_0x56484c(0xe3)] == _0x388b86 ? !![] : ![];
    let _0x3e83e8 = (q = _0x5b303f[_0x56484c(0xbd)]("\x20"));
    const _0x114cc2 = _0x52ffca["trim"]()[_0x56484c(0xd4)](
        _0x52ffca["indexOf"]("\x20") + 0x1
      ),
      _0x1ad373 = _0x114cc2[_0x56484c(0xe5)]()[_0x56484c(0xd4)](
        _0x114cc2[_0x56484c(0x91)]("\x20") + 0x1
      ),
      _0x5ba7d8 = _0x5cbb01["chat"],
      _0x576d92 = _0x5cbb01[_0x56484c(0xbc)],
      _0x2a4f69 = _0x5cbb01[_0x56484c(0xe3)],
      _0x11c15a = _0x15882e["messages"][0x0],
      _0x3d805d = (_0x436c29, _0x23af12) => {
        const _0x46407c = _0x56484c;
        return !_0x23af12
          ? chalk[_0x46407c(0xa1)](_0x436c29)
          : chalk[_0x46407c(0xd5)](_0x23af12)(_0x436c29);
      },
      _0x331efc = _0x5cbb01[_0x56484c(0xdb)]
        ? await _0x34e142[_0x56484c(0xbe)](_0x5cbb01[_0x56484c(0x98)])[
            _0x56484c(0xa7)
          ]((_0x524897) => {})
        : "",
      _0x5bdaeb = _0x5cbb01[_0x56484c(0xdb)] ? _0x331efc[_0x56484c(0x93)] : "";
    let _0x1b1e36 =
      _0x52ffca["length"] > 0x1e
        ? q[_0x56484c(0xd4)](0x0, 0x1e) + _0x56484c(0xd8)
        : _0x52ffca;
    if (_0x4c9947 && !_0x5cbb01[_0x56484c(0xdb)])
      console[_0x56484c(0xad)](
        chalk[_0x56484c(0x95)](chalk[_0x56484c(0xc1)](_0x56484c(0x8a))),
        _0x3d805d(_0x1b1e36, _0x56484c(0x92)),
        chalk[_0x56484c(0x7c)]("From"),
        chalk[_0x56484c(0xa1)](_0x208872),
        chalk[_0x56484c(0xe0)](
          "[\x20" +
            _0x5cbb01["sender"][_0x56484c(0x9e)](_0x56484c(0x9f), "") +
            "\x20]"
        )
      );
    else
      _0x4c9947 &&
        _0x5cbb01["isGroup"] &&
        console[_0x56484c(0xad)](
          chalk["black"](chalk[_0x56484c(0xc1)](_0x56484c(0x8a))),
          _0x3d805d(_0x1b1e36, "turquoise"),
          chalk[_0x56484c(0x7c)](_0x56484c(0xb7)),
          chalk[_0x56484c(0xa1)](_0x208872),
          chalk[_0x56484c(0xe0)](
            "[\x20" +
              _0x5cbb01[_0x56484c(0xe3)][_0x56484c(0x9e)](
                "@s.whatsapp.net",
                ""
              ) +
              "\x20]"
          ),
          chalk[_0x56484c(0xb8)]("IN"),
          chalk[_0x56484c(0xa1)](_0x5bdaeb)
        );
    if (_0x4c9947)
      switch (_0x158081) {
        case _0x56484c(0xdc):
        case "menu":
        case _0x56484c(0xd9):
        case _0x56484c(0xa4):
          _0x5cbb01["reply"](
            _0x56484c(0xbf) +
              _0x51fe27 +
              _0x56484c(0xd3) +
              _0x51fe27 +
              _0x56484c(0xa2) +
              _0x51fe27 +
              _0x56484c(0x83)
          );
          break;
        case "ai":
        case _0x56484c(0x8b):
        case _0x56484c(0x80):
        case "ask":
          try {
            if (setting[_0x56484c(0xaa)] === _0x56484c(0xa8))
              return _0x576d92(_0x56484c(0x8e));
            if (!_0x3e83e8)
              return _0x576d92(
                _0x56484c(0x7d) +
                  _0x51fe27 +
                  _0x158081 +
                  "\x20What\x20is\x20a\x20recession"
              );
            const _0x9c56a8 = await openai["chat"][_0x56484c(0xb9)][
              _0x56484c(0x88)
            ]({
              messages: [{ role: _0x56484c(0xd0), content: q }],
              model: _0x56484c(0xc5),
            });
            await _0x5cbb01[_0x56484c(0xbc)](
              _0x9c56a8[_0x56484c(0xb6)][0x0][_0x56484c(0xcf)][_0x56484c(0x97)]
            );
          } catch (_0x510326) {
            _0x510326[_0x56484c(0xde)]
              ? (console[_0x56484c(0xad)](
                  _0x510326[_0x56484c(0xde)][_0x56484c(0xc7)]
                ),
                console[_0x56484c(0xad)](_0x510326[_0x56484c(0xde)]["data"]))
              : (console[_0x56484c(0xad)](_0x510326),
                _0x5cbb01[_0x56484c(0xbc)](
                  _0x56484c(0x85) + _0x510326[_0x56484c(0xcf)]
                ));
          }
          break;
        case _0x56484c(0x7f):
        case _0x56484c(0x89):
        case _0x56484c(0xe4):
        case _0x56484c(0xb3):
        case "dall-e":
        case _0x56484c(0xbb):
          try {
            if (setting[_0x56484c(0xaa)] === _0x56484c(0xa8))
              return _0x576d92(_0x56484c(0xdf));
            if (!_0x3e83e8)
              return _0x576d92(
                "Mcreate\x20an\x20image\x20from\x20AI.\x0a\x0aExample:\x0a" +
                  _0x51fe27 +
                  _0x158081 +
                  _0x56484c(0xcd)
              );
            const _0x11cf44 = await openai[_0x56484c(0xb3)][_0x56484c(0x87)]({
              model: _0x56484c(0x84),
              prompt: q,
              n: 0x1,
              size: "512x512",
            });
            _0x34e142["sendImage"](
              _0x5ba7d8,
              _0x11cf44[_0x56484c(0xc9)][0x0]["url"],
              _0x3e83e8,
              _0x11c15a
            );
          } catch (_0x103010) {
            _0x103010["response"]
              ? (console["log"](_0x103010[_0x56484c(0xde)][_0x56484c(0xc7)]),
                console[_0x56484c(0xad)](
                  _0x103010[_0x56484c(0xde)][_0x56484c(0xc9)]
                ),
                console[_0x56484c(0xad)](
                  _0x103010[_0x56484c(0xde)][_0x56484c(0xc7)] +
                    "\x0a\x0a" +
                    _0x103010[_0x56484c(0xde)][_0x56484c(0xc9)]
                ))
              : (console[_0x56484c(0xad)](_0x103010),
                _0x5cbb01["reply"](
                  _0x56484c(0x85) + _0x103010[_0x56484c(0xcf)]
                ));
          }
          break;
        case "sc":
        case _0x56484c(0xb0):
        case _0x56484c(0xac):
          _0x5cbb01[_0x56484c(0xbc)](_0x56484c(0xa6));
          break;
        default: {
          if (_0x4c9947 && _0x52ffca[_0x56484c(0xdd)]() != undefined) {
            if (_0x5cbb01[_0x56484c(0x98)]["endsWith"](_0x56484c(0xcc))) return;
            if (_0x5cbb01["isBaileys"]) return;
            if (!_0x52ffca[_0x56484c(0xdd)]()) return;
            if (_0x1b1e36 || (_0x4c9947 && !_0x5cbb01[_0x56484c(0xdb)]))
              console[_0x56484c(0xad)](
                chalk["black"](chalk[_0x56484c(0xb1)](_0x56484c(0xa5))),
                _0x3d805d(_0x56484c(0xc3), _0x56484c(0x92)),
                _0x3d805d("" + _0x51fe27 + _0x158081, _0x56484c(0x92)),
                _0x3d805d(_0x56484c(0xe2), "turquoise")
              );
            else
              (_0x1b1e36 || (_0x4c9947 && _0x5cbb01[_0x56484c(0xdb)])) &&
                console["log"](
                  chalk[_0x56484c(0x95)](chalk["bgRed"](_0x56484c(0xa5))),
                  _0x3d805d(_0x56484c(0xc3), "turquoise"),
                  _0x3d805d("" + _0x51fe27 + _0x158081, _0x56484c(0x92)),
                  _0x3d805d(_0x56484c(0xe2), _0x56484c(0x92))
                );
          }
        }
      }
  } catch (_0x26c12e) {
    _0x5cbb01[_0x56484c(0xbc)](util["format"](_0x26c12e));
  }
};
function _0x2987(_0x1b212f, _0x1b4209) {
  const _0x4195ae = _0x4195();
  return (
    (_0x2987 = function (_0x2987da, _0x112b9d) {
      _0x2987da = _0x2987da - 0x7a;
      let _0x5b6948 = _0x4195ae[_0x2987da];
      return _0x5b6948;
    }),
    _0x2987(_0x1b212f, _0x1b4209)
  );
}
let file = require["resolve"](__filename);
function _0x4195() {
  const _0x56340b = [
    "images",
    "2585eThCnN",
    "shift",
    "choices",
    "From",
    "blueBright",
    "completions",
    "44860fyTTHC",
    "dalle",
    "reply",
    "join",
    "groupMetadata",
    "*Whatsapp\x20Ai\x20Bot*\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a*(ChatGPT)*\x0aCmd:\x20",
    "text",
    "bgWhite",
    "unwatchFile",
    "command",
    "8BUyGEz",
    "gpt-3.5-turbo",
    "./key.json",
    "status",
    "messageContextInfo",
    "data",
    "selectedButtonId",
    "split",
    "broadcast",
    "\x20Wooden\x20house\x20on\x20snow\x20mountain",
    "listResponseMessage",
    "message",
    "user",
    "chalk",
    "decodeJid",
    "ai\x20\x0aAsk\x20anything\x20to\x20AI.\x0a\x0a*(DALL-E)*\x0aCmd:\x20",
    "substring",
    "keyword",
    "startsWith",
    "templateButtonReplyMessage",
    "...",
    "start",
    "exports",
    "isGroup",
    "help",
    "toLowerCase",
    "response",
    "Apikey\x20has\x20not\x20been\x20filled\x0a\x0aPlease\x20fill\x20in\x20the\x20apikey\x20first\x20in\x20the\x20key.json\x20file\x0a\x0aApikey\x20can\x20be\x20made\x20on\x20the\x20website:\x20https://beta.openai.com/account/api-keys",
    "yellow",
    "extendedTextMessage",
    "not\x20available",
    "sender",
    "image",
    "trim",
    "viewOnceMessageV2",
    "10797493pzkLpt",
    "magenta",
    "Chat\x20with\x20AI.\x0a\x0aExample:\x0a",
    "imageMessage",
    "img",
    "chatgpt",
    "mtype",
    "slice",
    "sc\x0aDisplays\x20the\x20source\x20code\x20of\x20the\x20bot\x20used",
    "dall-e-2",
    "Sorry,\x20there\x20seems\x20to\x20be\x20an\x20error\x20:",
    "2MxaoUW",
    "generate",
    "create",
    "ai-img",
    "[\x20LOGS\x20]",
    "openai",
    "conversation",
    "match",
    "Apikey\x20has\x20not\x20been\x20filled\x0a\x0aPlease\x20fill\x20in\x20the\x20apikey\x20first\x20in\x20the\x20key.json\x20file\x0a\x0aThe\x20api\x20key\x20can\x20be\x20generated\x20on\x20the\x20website:\x20https://beta.openai.com/account/api-keys",
    "7264615lEOnQU",
    "watchFile",
    "indexOf",
    "turquoise",
    "subject",
    "@whiskeysockets/baileys",
    "black",
    "3001060tHBjGT",
    "content",
    "chat",
    "caption",
    "6oxPgxi",
    "singleSelectReply",
    "3242082SXqfbA",
    "48932wGUKuB",
    "replace",
    "@s.whatsapp.net",
    "string",
    "green",
    "img\x0aCreate\x20an\x20image\x20from\x20text\x0a\x0a*(Source\x20Code\x20Bot)*\x0aCmd:\x20",
    "videoMessage",
    "info",
    "[\x20ERROR\x20]",
    "This\x20bot\x20uses\x20a\x20script\x20from\x20https://github.com/yesbhautik/Whatsapp-Ai-BOT",
    "catch",
    "ISI_APIKEY_OPENAI_DISINI",
    "selectedRowId",
    "keyopenai",
    "buttonsResponseMessage",
    "scbot",
    "log",
    "6110217QDuKKY",
    "redBright",
    "script",
    "bgRed",
    "cache",
  ];
  _0x4195 = function () {
    return _0x56340b;
  };
  return _0x4195();
}
fs[_0x39e3e6(0x90)](file, () => {
  const _0x1476e2 = _0x39e3e6;
  fs[_0x1476e2(0xc2)](file),
    console[_0x1476e2(0xad)](chalk[_0x1476e2(0xaf)]("Update\x20" + __filename)),
    delete require[_0x1476e2(0xb2)][file],
    require(file);
});
Download .txt
gitextract_6j4livl0/

├── .deepsource.toml
├── .github/
│   ├── CODEOWNERS
│   ├── CODE_OF_CONDUCT.md
│   ├── FUNDING.yml
│   ├── ISSUE_TEMPLATE/
│   │   ├── bug_report.md
│   │   └── feature_request.md
│   ├── PULL_REQUEST_TEMPLATE.md
│   └── SECURITY.md
├── .gitignore
├── Docs/
│   └── Deployment/
│       ├── Android.md
│       ├── Linux.md
│       ├── MacOS.md
│       └── Windows.md
├── LICENSE
├── README.md
├── example.key.json
├── index.js
├── package.json
└── yesbhautikai.js
Download .txt
SYMBOL INDEX (6 symbols across 2 files)

FILE: index.js
  function _0x4f7b (line 1) | function _0x4f7b(_0x260f88, _0x270b96) {
  function smsg (line 71) | function smsg(_0x1ac937, _0x3e6a42, _0xd50a88) {
  function _0x5ea8 (line 253) | function _0x5ea8() {
  function startHisoka (line 408) | async function startHisoka() {

FILE: yesbhautikai.js
  function _0x2987 (line 280) | function _0x2987(_0x1b212f, _0x1b4209) {
  function _0x4195 (line 292) | function _0x4195() {
Condensed preview — 19 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (80K chars).
[
  {
    "path": ".deepsource.toml",
    "chars": 90,
    "preview": "version = 1\n\n[[analyzers]]\nname = \"python\"\n\n  [analyzers.meta]\n  runtime_version = \"3.x.x\""
  },
  {
    "path": ".github/CODEOWNERS",
    "chars": 1,
    "preview": "\n"
  },
  {
    "path": ".github/CODE_OF_CONDUCT.md",
    "chars": 3214,
    "preview": "# Code of Conduct\n\n## Our Pledge\n\nIn the interest of fostering an open and welcoming environment, we as contributors and"
  },
  {
    "path": ".github/FUNDING.yml",
    "chars": 138,
    "preview": "github: yesbhautik\npatreon: \nopen_collective: \nko_fi: \ntidelift: \ncommunity_bridge: \nliberapay: \nissuehunt: \notechie: \nl"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/bug_report.md",
    "chars": 834,
    "preview": "---\nname: Bug report\nabout: Create a report to help us improve\ntitle: ''\nlabels: ''\nassignees: ''\n\n---\n\n**Describe the b"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/feature_request.md",
    "chars": 595,
    "preview": "---\nname: Feature request\nabout: Suggest an idea for this project\ntitle: ''\nlabels: ''\nassignees: ''\n\n---\n\n**Is your fea"
  },
  {
    "path": ".github/PULL_REQUEST_TEMPLATE.md",
    "chars": 1,
    "preview": "\n"
  },
  {
    "path": ".github/SECURITY.md",
    "chars": 1375,
    "preview": "# Security Policy\n\n## Supported Versions\n\nUse this section to tell people about which versions of your project are curre"
  },
  {
    "path": ".gitignore",
    "chars": 178,
    "preview": "# ignore node modules\nnode_modules/\n\n# ignore /yesbhautik/* excluding convo.txt file\n/yesbhautik/*\n!/yesbhautik/convo.tx"
  },
  {
    "path": "Docs/Deployment/Android.md",
    "chars": 799,
    "preview": "### Deploy on Android/Termux<br>\n1. Install Termux App: [Click link to download](https://f-droid.org/en/packages/com.ter"
  },
  {
    "path": "Docs/Deployment/Linux.md",
    "chars": 827,
    "preview": "### Deploy on Linux</br>\n1. Install NodeJS, nano and Git Bash.\n\n      ```bash\n      sudo apt -y remove nodejs\n      curl"
  },
  {
    "path": "Docs/Deployment/MacOS.md",
    "chars": 828,
    "preview": "### Deploy on MacOS</br>\n1. Install NodeJS, nano and Git Bash.\n\n      ```bash\n      sudo apt -y remove nodejs\n      curl"
  },
  {
    "path": "Docs/Deployment/Windows.md",
    "chars": 811,
    "preview": "### Deploy on Windows</br>\n1. Install NodeJS and Git Bash.\n      - NodeJS https://nodejs.org/en/download/ <br>\n      - G"
  },
  {
    "path": "LICENSE",
    "chars": 20845,
    "preview": "Attribution-NonCommercial-ShareAlike 4.0 International\n\n================================================================"
  },
  {
    "path": "README.md",
    "chars": 3883,
    "preview": "# 💬 Whatsapp-Ai-BOT 🤖\nA cutting-edge AI chatbot for WhatsApp 🤖💬 built using NodeJS technology and powered by OpenAI. Thi"
  },
  {
    "path": "example.key.json",
    "chars": 169,
    "preview": "{\n  \"keyopenai\": \"OPENAI_API_KEY\",\n  \"donate\": \"Support WhatsApp-Ai-BOT Project and in return, get exclusive access to P"
  },
  {
    "path": "index.js",
    "chars": 25842,
    "preview": "function _0x4f7b(_0x260f88, _0x270b96) {\n  const _0x5ea8eb = _0x5ea8();\n  return (\n    (_0x4f7b = function (_0x4f7b5e, _"
  },
  {
    "path": "package.json",
    "chars": 1280,
    "preview": "{\n  \"name\": \"Whatsapp-Ai-BOT\",\n  \"version\": \"2.1.0\",\n  \"description\": \"Whatsapp Ai Bot, developed BY Bhautik Bavadiya wi"
  },
  {
    "path": "yesbhautikai.js",
    "chars": 13856,
    "preview": "const _0x39e3e6 = _0x2987;\n(function (_0x34eda4, _0x4ab326) {\n  const _0x4ef61a = _0x2987,\n    _0x5333ec = _0x34eda4();\n"
  }
]

About this extraction

This page contains the full source code of the yesbhautik/Whatsapp-Ai-BOT GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 19 files (73.8 KB), approximately 25.8k tokens, and a symbol index with 6 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!