Whatsapp_Bot Using Python

 

Description

A Simple Bot made using Python to Send WhatsApp Message.

  • How to create a WhatsApp bot using python?
  • How to use pywhatkit to automat WhatsApp?



 

Step 1: Installing Required Libraries To begin, you need to install the required libraries for the Python Whatsapp_Bot. Run the following command to install the "pywhatkit" library:

pip install pywhatkit

Step 2: Importing Libraries After installing the required libraries, you need to import them into your Python script. Here is the code to import the "pywhatkit" and "datetime" library:


import pywhatkit
from datetiem import datetime

Step 3: Copy the following python code and save it "Whatsapp_Bot.py"


import pywhatkit

from datetime import datetime

PHONE_NUMBER = input("Enter Phone Number: ")

MESSAGE = input("Enter Message: ")

HR = int(input("Enter Hour: "))     # 24 Hour Format

MIN = int(input("Enter Minutes:"))

pywhatkit.sendwhatmsg(PHONE_NUMBER, MESSAGE, HR, MIN)


Step 4:  Just open a terminal in the folder where your script is located and run the following command:


python Whatsapp_Bot.py


 

Next Post Previous Post
No Comment
Add Comment
comment url

WhatsApp Group