Whatsapp-bot - Whatsapp chatbot build with python and twilio

Overview

Whatsapp-bot

This is a Whatsapp Chatbot that responds with quotes, reply owners name, search internet for meaning of any word.

Usage

  1. Download and install Python. Version 3 and above should come with pip.

  2. Clone or fork this repository (project).

    $ git clone https://github.com/arinzejustin/whatsapp-bot.git
    
    $ cd whatsapp-bot
    
  3. Create a virtual environment inside this project directoy e.g.,

    python -m venv whatsapp-bot-venv
    

    Then activate that environment:

    Windows: whatsapp-bot-venv\Scripts\activate
    
    Mac: $ source whatsapp-bot-venv/bin/activate
    
  4. Install the following dependencies: twilio, flask, requests, beautifulsoup, wikipedia.

    $ pip install twilio flask requests beautifulsoup4 wikipedia
    
  5. Run the Flask application
    Start by setting (exporting) the FLASK_APP environment variable

    Windows: set FLASK_APP=bot.py
    
    Mac: $ export FLASK_APP=bot.py
    

    Run this command afterwards:

    python -m flask run
    
  6. Test the chatbot.

    a. Download ngrok. From your CLI (terminal or CMD), navigate to the ngrok directory and run this command:

     $ ngrok http -region=eu 5000
    

    Copy the URL where you see Forwarding. It will look like this https://510f-197-211-63-19.eu.ngrok.io.

    ngrok jpg

    b. Create an account on Twilio and navigate to the Whatsapp Sandbox. Follow the instructions from Twilio to get a test whatsapp account. At the end of the setup, paste the url you copied earlier into the input field with the label WHEN A MESSAGE COMES IN. At the end of the URL, add '/chatbot' and hit save.

    See the screenshot below:

    twilio jpg

    Bonus: You can create a customized link for your Whatsapp chatbot. Use this template: http://wa.me/<phone-number-from-twilio>?text=<code-to-join-sandbox>.

    twilio whatsapp number jpg

    Send the link to your friends to try out the chatbot.

Technologies Used

  • Python, Flask framework
  • Twilio
  • ngrok
  • wikipedia
  • beautifulsoup

Contact

Send me an email
Visit my website

License GitHub

See license

Owner
arinzejustinng
Iโ€™m a self-taught Front End Developer and a little bit backend Developer, an Economics student from Nigeria. I like knowing logic behind any application
arinzejustinng
Python client for using Prefect Cloud with Saturn Cloud

prefect-saturn prefect-saturn is a Python package that makes it easy to run Prefect Cloud flows on a Dask cluster with Saturn Cloud. For a detailed tu

Saturn Cloud 15 Dec 07, 2022
Uses discords api to see if a token has a valid payment method.

Discord Payment Checker Uses discords api to see if a token has a valid payment method. Report Bug ยท Request Feature Features Checks tokens Checks all

dropout 10 Dec 01, 2022
Discord Panel is an AIO panel for Discord that aims to have all the needed tools related to user token interactions, as in nuking and also everything you could possibly need for raids

Discord Panel Discord Panel is an AIO panel for Discord that aims to have all the needed tools related to user token interactions, as in nuking and al

11 Mar 30, 2022
Use Node JS Keywords In Python!!!

Use Node JS Keywords In Python!!!

Sancho Godinho 1 Oct 23, 2021
A python based Telegram Bot for Compressing Videos with negligible Quality change

๐•๐•š๐••๐•–๐•  โ„‚๐•†๐•„โ„™โ„๐”ผ๐•Š๐•Š๐•†โ„ ๐”น๐•†๐•‹ แดแดœสŸแด›ษชา“แดœษดแด„แด›ษชแดษด วซแดœแด€สŸษชแด›ส แด„แดแดแด˜ส€แด‡ssแดส€ A Telegram Video CompressorBot it compress videos with negligible Quality change.

Danish 154 Dec 04, 2022
A bot i made for a dead com server lol it gets updated daily etc

6ix-Bot-Source A bot i made for a dead com server lol it gets updated daily etc For The UserAgent CMD https://developers.whatismybrowser.com/ thats a

Swiper 9 Mar 10, 2022
OpenQuake's Engine for Seismic Hazard and Risk Analysis

OpenQuake Engine The OpenQuake Engine is an open source application that allows users to compute seismic hazard and seismic risk of earthquakes on a g

Global Earthquake Model 281 Dec 21, 2022
Automatically copy the Discord Status of a Friend you share a server with (conditions have to be satisfied to work)

CopyDiscordStatusOfUser-SelfBot Basic Function Automatically copy the Discord Status of a friend User whom you share a server with (These conditions h

Certified Baller 5 Aug 05, 2022
๐€ ๐ฆ๐จ๐๐ฎ๐ฅ๐š๐ซ ๐“๐ž๐ฅ๐ž๐ ๐ซ๐š๐ฆ ๐†๐ซ๐จ๐ฎ๐ฉ ๐ฆ๐š๐ง๐š๐ ๐ž๐ฆ๐ž๐ง๐ญ ๐›๐จ๐ญ ๐ฐ๐ข๐ญ๐ก ๐ฎ๐ฅ๐ญ๐ข๐ฆ๐š๐ญ๐ž ๐Ÿ๐ž๐š๐ญ๐ฎ๐ซ๐ž๐ฌ

๐‡๐จ๐ฐ ๐“๐จ ๐ƒ๐ž๐ฉ๐ฅ๐จ๐ฒ For easiest way to deploy this Bot click on the below button ๐Œ๐š๐๐ž ๐๐ฒ ๐’๐ฎ๐ฉ๐ฉ๐จ๐ซ๐ญ ๐†๐ซ๐จ๐ฎ๐ฉ ๐’๐จ๐ฎ๐ซ๐œ๐ž๐ฌ ๐†๐ž๐ง๐ž?

Mukesh Solanki 2 Oct 06, 2021
An async python wrapper to interact with the Steam API and its CMs

steam.py A modern, easy to use, and async ready package to interact with the Steam API. Heavily inspired by discord.py and borrowing functionality fro

James Hilton-Balfe 90 Dec 15, 2022
ๆฑชๆฑชBotๆ˜ฏไธ€ไธชTelegram Bot๏ผŒ็”จไบŽๅธฎๅŠฉไฝ ็ฎก็†ไธ€ๅฐๆœๅŠกๅ™จไธŠ็š„Docker

WangWangBot ๆฑชๆฑชBotๆ˜ฏไธ€ไธชTelegram Bot๏ผŒ็”จไบŽๅธฎๅŠฉไฝ ็ฎก็†ไธ€ๅฐๆœๅŠกๅ™จไธŠ็š„Docker่ฟ่กŒ็š„Botใ€‚่ฟ™ๆ˜ฏไฝฟ็”จ่ง†้ข‘๏ผš ้ƒจ็ฝฒ่ฏดๆ˜Ž ๅฎ‰่ฃ…่ฟ่กŒ ๅ‡†ๅค‡ local.env ๆ™ฎ้€š็‰ˆๆœฌ BOT_TOKEN=ไฝ ็š„BOT_TOKEN ADMINS=ไฝฟ็”จ,ๅˆ†้š”็š„็ฎก็†ๅ‘˜IDๅˆ—่กจ ๅฆ‚ๆžœไฝ ไฝฟ็”จdoppl

่€ๆˆฟไธœ็š„ไปฃ็ ็ปƒไน ๅ†Œ 56 Aug 23, 2022
A fully responsive interface to manage all your favorite software on your HTPC.

Python 3 port of Hellowlol's HTPC Manager fork We made this an organization repository to be more independent from single developers. If you want to j

26 Jan 04, 2023
Riverside Rocks Python API

APIv2 Riverside Rocks Python API Routes GET / Get status of the API GET /api/v1/tor Get Tor metrics of RR family GET /api/v1/metrics Get bandwidth

3 Dec 20, 2021
Um bot simples para seguir as pessoas

Um bot simples para seguir pessoas no instagram, criado apeanas para testes. Utilizando o framework "Selenium", criei um bot para entrar em uma conta

Mobben 1 Nov 05, 2021
Stop writing scripts to interact with your APIs. Call them as CLIs instead.

Zum Stop writing scripts to interact with your APIs. Call them as CLIs instead. Zum (German word roughly meaning "to the" or "to" depending on the con

Daniel Leal 84 Nov 17, 2022
Man-Userbot adalah userbot Telegram modular yang berjalan di Python3 dengan database sqlalchemy

Man-Userbot Telegram Man-Userbot adalah userbot Telegram modular yang berjalan di Python3 dengan database sqlalchemy. Berbasis Paperplane dan ProjectB

DzLyz 1 Feb 12, 2022
Automating whatsapp with python

whatsapp-automation Automating whatsapp with python used on this project pyautogui pywhatkit pyttsx3 SpeechRecognition colorama embedded in python tim

Miguel 60 Nov 21, 2022
Discord bot for Ukrfans Discord server

Ukrfans Discord Bot Discord bot for Ukrfans Discord server. ๐Ÿ’ก Prerequisites Python โš™๏ธ Build & Run Create an .env file in the root directory and add t

3 Jun 24, 2022
A Telegram Video Watermark Adder Bot in Pyrogram by @AbirHasan2005

Watermark-Bot A Telegram Video Watermark Adder Bot by @AbirHasan2005 Features: Save Custom Watermark Image. Auto Resize Watermark According to Video q

Abir Hasan 95 Nov 20, 2022
Send song lyrics to iMessage users using the Genius lyrics API

pyMessage Send song lyrics to iMessage users using the Genius lyrics API. Setup 1.) Open the main.py file, and add your API key on line 7. 2.) Install

therealkingnull 1 Jan 23, 2022