Code Monkey home page Code Monkey logo

whatsapp-bot's Introduction

WhatsApp Bot ๐Ÿ”ฅ

A simple Whatsapp bot made using wa-automate python library with some additional features.
Try it out by sending #help on +916268727514 this number.

โœจ Installation

You can run this bot directly on your system by just following some steps:

  1. Install the required libraries which are mentioned in requirements.txt
  2. Download chrome driver - Here and Add the chrome driver path to Environment Variables.
  3. Change the three variables in bot.py
    • First Project_Path

      Set it to the path of your working folder + "\User_Data"

    • Second YOUR_MOBILE_NUMBER

      add your mobile number here

    • Third Jdoodle_clientId

      add your jdoodle api cliendId

    • Fourth Jdoodle_clientSecret

      add your jdoodle api clientSecret(Get it from jdoodle website mentioned above just sign in and choose free plan.)

  4. Now just run bot.py file scan the qr from phone for the first time.

โœจ Supported features and Commands

1. Compiler โœ…

  • This is to run code using Jdoodle api which is free. Get it from Here, you have to add your api keys in the code to use this feature.

  • Command for this : #run cpp# (You can choose any languge in place of cpp,check list of language using #listlang command or from Jdoodle website.) Write your code here from next line

  • Example:

    #run python3#
    for i in range(3):
        print("Hello")
    
  • Most of the language are supported like python3, c, java, etc.

    Note: Don't give runtime input statements or try to run infinite loop,it will give error message. (You can change the code if you want to add this runtime input feature, see jdoodle doc for that.)


2. Tic Tac Toe Game โœ…

  • You can play Tic Tac Toe game with anyone or anyone can play this game with other person in whatsapp chat.
  • To play send #tic_game#(tag the number you want to play with or type the sender id)
  • Type #help_wgame for controls
  • Instructions:
    Send the corresponding number to the block where you want to place your symbol
    #1 | #2 | #3
    #4 | #5 | #6
    #7 | #8 | #9
    To end the game early send #quit_tic

3. Word game โœ…

  • You can play word guessing game with friends and compete each other.
  • To start the game send #wordgame
  • Type #help_wgame for controls and other commands.

4. Geeks for Geeks code extractor โœ…

  • Get the code from geeks for geeks site of any problem/question.
  • To get the code for particular problem type #gfg#Your question#the language in which you want the code.
  • Example: #gfg#merge sort#python , #gfg#kadane algorithm #c++

If language is not given while asking then default c++ is taken as language.


5. Match Emoji Game โœ…

  • To start the game send #matchgame
  • For setting level add 2 or 4 or 6 after #matchgame with a space.
  • example:#matchgame 4

If you want to know how to play this game go through this link: Here


6. Minesweeper Game โœ…

  • To start the game send #minegame and to set level place level number 1 to 6 after #minegame with a space.
  • example: #minegame 3. Default level is 4
  • To choose a box send #mine xy where x is row and y is column.

If you want to know how to play this game go through this link: Here


7. Wikipedia Search โœ…

  • Search anything on wikipedia by using #wiki title
  • example: #wiki Albert Einstein

8. Commands only for admins of a group โœ…

  • #add 919876543210
  • #kick tag the person
  • #link for link of the group
  • #tagall to tag all the members of the group
  • #tagadmins to tag all the admins of the group

    Note: You can also add some text after #tagall and #tagadmins.


9. Commands only for the owner of the bot โœ…

  • #on and #off for turning on and off bot for a particular group of whatsapp.
  • #endwgame for ending the word game.
  • #all_cmd to get list of all commands of bot.

โœจ Links

Reference (openwa)

โœจ Contributing

Pull requests are welcome! If you see something you'd like to add, please do. For drastic changes, please open an issue first. If you want me to add something you are most welcome.

โœจ Disclaimer

This project is not affiliated, associated, authorized, endorsed by, or in any way officially connected with WhatsApp or Geeks for Geeks or any of its subsidiaries or its affiliates.
The official WhatsApp website can be found at Here and official geeks for geeks website can be
found at here

โœจ Contact

For any query you can contact me via email [email protected] or if you have any contribution for the project you are welcome.

whatsapp-bot's People

Contributors

shyguy99 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.