All Projects → boehlergerman → Wappbot

boehlergerman / Wappbot

Licence: mit
Automatic answering of incoming messages by means of javascript and using Whatsapp Web

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Wappbot

Whaticket
A very simple Ticket System based on WhatsApp messages, that allow multi-users in same WhatsApp account.
Stars: ✭ 120 (+118.18%)
Mutual labels:  bot, whatsapp
Whatsapp Assistant Bot
A personal WhatsApp assistant bot that will help you search anything on the web (Google, Images, Google Maps)
Stars: ✭ 198 (+260%)
Mutual labels:  bot, whatsapp
Magento Chatbot
Magento Chatbot Integration with Telegram, Messenger, Whatsapp, WeChat, Skype and wit.ai.
Stars: ✭ 149 (+170.91%)
Mutual labels:  bot, whatsapp
Wa Automate Nodejs
💬 🤖 The most advanced NodeJS WhatsApp library for chatbots with advanced features. Be sure to 🌟 this repository for updates!
Stars: ✭ 1,326 (+2310.91%)
Mutual labels:  bot, whatsapp
Me bot
Build a bot that speaks like you!
Stars: ✭ 641 (+1065.45%)
Mutual labels:  bot, whatsapp
Whatsappbot
Send messages to any person in any time how much you want.
Stars: ✭ 104 (+89.09%)
Mutual labels:  bot, whatsapp
Whatsapp Bot
BOT - WhatsApp Web in TypeScript
Stars: ✭ 170 (+209.09%)
Mutual labels:  bot, whatsapp
Whatsapp Web.js
A WhatsApp client library for NodeJS that connects through the WhatsApp Web browser app
Stars: ✭ 4,103 (+7360%)
Mutual labels:  bot, whatsapp
Wbot
A simple Web based BOT for WhatsApp™ in NodeJS 😜. Working as of 📅 Feb 14th, 2020
Stars: ✭ 638 (+1060%)
Mutual labels:  bot, whatsapp
Whatsapp Web Bot
Whatsapp Web Bot - Example of Bot for use on Whatsapp Web (on Chrome)
Stars: ✭ 450 (+718.18%)
Mutual labels:  bot, whatsapp
Wasapbot
[abandoned ❗] Simple WhatsApp bot written in PHP, respond to private & group messages. Uses Chat-API
Stars: ✭ 89 (+61.82%)
Mutual labels:  bot, whatsapp
Sulla
👩🏻‍🔬 Javascript Whatsapp api library for chatbots
Stars: ✭ 844 (+1434.55%)
Mutual labels:  bot, whatsapp
Whatsapp Node Api
A Simple NodeJS API Wrapper for WhatsApp
Stars: ✭ 81 (+47.27%)
Mutual labels:  bot, whatsapp
Whatsapp Api
Rest API to send messages through whatsapp
Stars: ✭ 112 (+103.64%)
Mutual labels:  bot, whatsapp
Webwhatsappbot
Core to automatize whatsapp - working 11/2018
Stars: ✭ 59 (+7.27%)
Mutual labels:  bot, whatsapp
Venom
Venom is the most complete javascript library for Whatsapp, 100% Open Source.
Stars: ✭ 3,457 (+6185.45%)
Mutual labels:  bot, whatsapp
Notify
A dead simple Go library for sending notifications to various messaging services.
Stars: ✭ 727 (+1221.82%)
Mutual labels:  bot, whatsapp
Whatsapp Framework
⚗️Whatsapp python api
Stars: ✭ 945 (+1618.18%)
Mutual labels:  bot, whatsapp
Telegram Bot Groupagree
An advanced poll bot for Telegram
Stars: ✭ 52 (-5.45%)
Mutual labels:  bot
Python Sdk
A simple API wrapper for top.gg written in Python
Stars: ✭ 54 (-1.82%)
Mutual labels:  bot

WappBot

Experimental project, which allows to detect the instant in which a new message is received and to carry out an automatic answer, with the possibility of giving personalized options. This project is based on an excellent application of an unofficial API for whatsapp, which is thanked below. https://github.com/mukulhase/WebWhatsapp-Wrapper

The main objective is to present a simple implementation without the need for large installations.

Getting Started

To start it is necessary to have a registered instance of whatsapp web, and then copy the code contained in the file WappBot.js (See the configuration section for more details, otherwise the code contains default settings). Once copied and configured correctly, open your browser console F12 and paste the code.

for more information go to the wiki - WIKI

Prerequisites

you must have a valid whatsapp account and access to whatsapp web

Settings

Default configuration:
 {
    useApi: false,
    uriApi: "https://wapp-bot.herokuapp.com/message",
    ignoreChat: [],
    ignoreGroupChat: false,
    messageInitial: {
      text: "Hello I'm WappBot send a reply \n",
      image: null
    },
    messageIncorrect: "Incorrect option entered, we remind you that the options are: \n",
    messageOption: {
      "@Date": {
        text: new Date().toLocaleDateString(),
        image: null
      },
      "@Christmas": {
        text: (() => {
          let myDate = new Date();
          let cmas = Date.parse("Dec 25, " + myDate.getFullYear())
          let today = Date.parse(myDate)

          let daysToChristmas = Math.round((cmas - today) / (1000 * 60 * 60 * 24))
          if (daysToChristmas == 0)
            return "Today is Christmas ... Merry Christmas!"
          if (daysToChristmas < 0)
            return "Christmas was " + -1 * (daysToChristmas) + " days ago.";
          if (daysToChristmas > 0)
            return "There are " + daysToChristmas + " days to Christmas!"
        })(),
        image: null
      }
  }
Options:
  useApi                   [Bool] [Default False], allows you to use an API for message processing,
                           see the DialogFlow-Nodejs-WappBot repository.
                           
  uriApi                   [String] URL of the api you wish to consult,
                            you can use the proposed API, it's free :)
                            [WappBot-API](https://github.com/boehlergerman/DialogFlow-Nodejs-WappBotAPI)
  
  ignoreChat               [Array] prevents repeated messages, preventing a "hello" from being sent again
                           when an incorrect option is entered
  
  ignoreGroupChat          [Bool] [Default false] prevents automatic message sending if the chat is a group
  
  messageInitial           [Object] configuration of the first message to be sent to the chat
    |                      that generated an incoming message
    |                  
    |-> text               [String | Self-Invoking Anonymous Function] Welcome text
    |
    |-> image              [String] [Default Null] [Support Base64 Full Format | URL IMAGE]
                            image to be sent together with the welcome text

  messageIncorrect         [String] reply message in case an incorrect option is entered

  messageOption            [Object] configuration of the response options that are enabled for the user
    |
    |
    |-> KeyOption          [String] identifier to be shown to the user, it is convenient to use a special
          |                 character at the beginning such as @ # $,
          |                 to avoid misinterpreting the user's message.
          |
          |-> text         [String | Self-Invoking Anonymous Function] 
          |                  Text to display when the user enters the option properly
          |
          |-> image        [String] [Default Null] [Support Base64 Full Format | URL IMAGE]
                            image to be sent together with the text of the desired option

Important

URL use is limited by Content-Security-Policy

Whatsapp Web contains meta tag that avoids that from the context of the site are executed requests to the outside that are not contemplated in the header, for a security issue this header can only add more restriction and not remove it.

Therefore, the use of URLAPI or IMAGE configuration in URL format and not Base64 will lead to an error in the console when you receive an incoming message. This problem can be solved by installing an extension in your browser that removes the security of CSP and thus be able to use the full potential of HTTPS and HTTP requests within the context of Whatsapp Web.

Disable CSP Extension recommend

Otherwise you should use applications such as NWJS or Electron that simulate a context above whatsapp web.

Wappbot extension for google chrome

Wappbot also exists in extension format for google chrome that allows you to use without knowing javascript, also add the functionality to disable CSP automatically

link to the chrome play store: Play store

link to the wiki to know how to use it: Wiki extension chrome

_

Examples and results

starting using script in console

starting using extension chrome, Choice Settings

_

starting using extension chrome, WappBot API with DialogFlow (Spanish)

    useApi: true,
    uriApi: "https://wapp-bot.herokuapp.com/message"

results with image configuration, remember to disable CSP
    messageInitial: {
      text: "Hello I'm WappBot send a reply \n",
      image: "https://i.imgur.com/4ufAcMb.png"
    },
    messageIncorrect: "Incorrect option entered, we remind you that the options are: \n",
    messageOption: {
      "@Date": {
        text: new Date().toLocaleDateString(),
        image: null
      },
      "@Christmas": {
        text: "My text",
        image: "https://i.imgur.com/GJXbceA.jpg"
      }
    }

Authors

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Legal

This code is in no way affiliated with, authorized, maintained, sponsored or endorsed by WhatsApp or any of its affiliates or subsidiaries. This is an independent and unofficial software. Use at your own risk.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].