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
Mikasa is a 100% Spanish bot, a multifunctional bot, Mikasa is in beta.

Mikasa Miaksa, It is a multi-functional discord bot that is currently in development, this is not complete, there are still many things to fix and imp

Made in 2 Oct 05, 2021
Hello i am TELEGRAM GROUP MANAGEMENT BOT MY NAME IS Evil-Inside ⚡ i have both amazing modules

Evil-Inside DEMO BOT - Evil-Inside Hello i am TELEGRAM GROUP MANAGEMENT BOT MY NAME IS Evil-Inside ⚡ i have both amazing modules ℂ𝕆ℕ𝕋𝔸ℂ𝕋 𝕄𝔼 𝕆ℕ

PANDITHAN 52 Nov 20, 2022
Simple Telegram webscrap bot

webscrap-bot Simple Telegram webscrap bot Configs TOKEN - Get bot token from @BotFather API_ID - From my.telegram.org API_HASH - From my.telegram.org

lokaman chendekar 10 Oct 21, 2022
A Python wrapper around the Soundcloud API

soundcloud-python A friendly wrapper around the Soundcloud API. Installation To install soundcloud-python, simply: pip install soundcloud Or if you'r

SoundCloud 83 Dec 12, 2022
This is a translator that i made by myself in python with the 'googletrans' library

Translator-Python This is a translator that i made by myself in python with the 'googletrans' library This application completely made in python allow

Thadeuks 2 Jun 17, 2022
Requests based multi-threaded script for increasing followers on Spotify

Proxyless Spotify Follow Bot Requests based multi-threaded script for increasing followers on Spotify. Click here to report bugs. Usage Download ZIP h

397 Jan 03, 2023
Python wrapper library for World Weather Online API

pywwo Python wrapper library for World Weather Online API using lxml.objectify How to use from pywwo import * setKey('your_key', 'free') w=LocalWeat

World Weather Online 20 Dec 19, 2022
A Python library for miHoYo bbs and HoYoLAB Community

A Python library for miHoYo bbs and HoYoLAB Community. genshin 原神签到小助手

384 Jan 05, 2023
aws-lambda-scheduler lets you call any existing AWS Lambda Function you have in a future time.

aws-lambda-scheduler aws-lambda-scheduler lets you call any existing AWS Lambda Function you have in the future. This functionality is achieved by dyn

Oğuzhan Yılmaz 57 Dec 17, 2022
The Encoder Bot For Python

The_Encoder_Bot Configuration Add values in environment variables or add them in config.env.example and rename file to config.env. Basics API_ID - Get

8 Jan 01, 2022
Riffdog Terraform scanner - finding 'things' in the Real World (aka AWS) which Terraform didn't put there.

riffdog Riffdog Terraform / Reality scanner - finding 'things' in the Real World which Terraform didn't put there. This project works by firstly loadi

Riffdog 4 Mar 23, 2020
A Telegram Bot for adding Footer caption beside main caption of Telegram Channel Messages.

Footer-Bot A Telegram Bot for adding Footer caption beside main caption of Telegram Channel Messages. Best for Telegram Movie Channels. Made by @AbirH

Abir Hasan 35 Jan 02, 2023
Discord bot to administer IITD Study Servers (unofficial)

IITD-Bot Discord bot to administer IITD'20 Acad Server Commands hello to check if bot is online ?help to display this message ?set kerberos to set y

Aditya Singh 47 Dec 19, 2022
A discord token creator that uses the service capmonster for captcha solving!

Discord Token Creator A discord token creator that uses the service capmonster for captcha solving! Report Bug · Request Feature Features Autojoin dis

dropout 41 Oct 25, 2021
This repository are used to give class about AWS

AWSTraining This repository are used to give class about AWS by Marco Antonio Pereira Linkedin: https://www.linkedin.com/in/marcoap To see the types o

Marco Antonio Pereira 6 Nov 23, 2022
Powerful Url uploader bot With Mongodb support 🔥

Uploader X Bot Telegram RoBot to Upload Links. Features: 👉 Upload YouTube-dl Supported Links to Telegram. 👉 Upload HTTP/HTTPS as File/Video to Teleg

C͡linton Abraꫝam 250 Jan 06, 2023
Telegram bot to provide Telegram user/group/channel information

Whois-TeLeTiPs Telegram bot to provide Telegram user/group/channel information Deployment Methods Heroku Config Vars API_ID : Telegram API_ID, get it

11 Oct 21, 2022
A stock information collector and parser for Taiwan and US market. Automatically send LINE message if the pre-defined rules are triggered.

agastock 開發動機 就在海運飆漲的2021年7月,差點跪在地上喜迎財富自由的當下,EPS超高好消息不斷的長榮竟然套在202元一去不回,有圖有真相(哭) 忽然體會到追高殺低不是辦法,魯蛇我得靠邏輯分析也能出頭天,經過三個月無數個不出門的周末,產出簡單的爬蟲和分析工具。 上過金融研訓院的量化交易

Gavin Lee 12 Nov 16, 2022
Cord Python API Client

Cord Python API Client The data programming platform for AI 💻 Features Minimal low-level Python client that allows you to interact with Cord's API Su

Cord 52 Nov 25, 2022
Telegram Voice-Chat Bot

Telegram Voice-Chat Bot [PyTGCalls] ⇝ Requirements ⇜ Account requirements A Telegram account to use as the music bot, You cannot use regular bot accou

1 Dec 03, 2021