Skip to content

A christmas invisible friend whatsapp bot to send random messages

License

Notifications You must be signed in to change notification settings

PatoOsoPatoso/christmas_random_friend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CHRISTMAS_RANDOM_FRIEND

Lucas Arroyo Blanco

PatoOsoPatoso

 

Table of contents

    1 )  Description

    2 )  Requirements

    3 )  Modifications to be used

 
 

Description

It's a simple python script to make it easier to decide which person is going to gift who, it's pretty useful in a large group of people who can't meet in person to make the raffle.

The plus of this script is that it uses your whatsapp account or any account that you have logged into whatsapp web in your browser.

 

Requirements

There are 2 requirements to use this script:

  • An active whatsapp web session in the browser.
  • A .env file with the names and phone numbers.

 

Modifications to be used

To use the code as it is right now first you are going to need to create a .env file.
The file should look like this:
 

PHONE_NUMBERS=Lucas:34123456789,Pablo:34111111111,Sandra:34999999999,Julio:34000000000

This is just an example of the pattern that it's used to parse the names and the phones into a list. To modify it just use a : to separate the name from the phone number of one person and a , to separate different persons.
 

The browser data and binary executable where the whatsapp session is active are necessary aswell. Here is my case with google chrome:

if os.name == 'nt':
    user_data_dir = rf'C:\Users\{getpass.getuser()}\AppData\Local\Google\Chrome\User Data'
    user_binary_location = r'C:\Program Files\Google\Chrome\Application\chrome.exe'
else:
    user_data_dir = rf'/home/{getpass.getuser()}/.config/google-chrome/Default'
    user_binary_location = r'/usr/bin/google-chrome'

Modify for Windows or Linux with the actual path for your user data and binary executable.

 
 

drawingbye bye

About

A christmas invisible friend whatsapp bot to send random messages

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages