Skip to content

Commit

Permalink
Swifted from Dev PC to Github
Browse files Browse the repository at this point in the history
Whatsbot First Commit
  • Loading branch information
Tuhin Kanti Pal authored Dec 18, 2020
1 parent 25571b9 commit b034620
Show file tree
Hide file tree
Showing 20 changed files with 1,010 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Aptfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
unzip
git
pyhton3
python
zip
82 changes: 82 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
<h1 align="center">
<a href="https://github.com/TheWhatsBot/WhatsBot"><img src="https://telegra.ph/file/96ccad5945c18944c5f15.png" alt="whatsbot" width="290"></a>
<br>
<b>Whatsbot</b>
</h1>
<h4 align="center">Moduler Userbot for Whatsapp</h4>
<br>
<p align="center">
<a href="https://github.com/TheWhatsBot/WhatsBot/releases">
<img src="https://shields.io/badge/WHATSBOT-Version--1.0.0-red?logo=whatsapp&style=for-the-badge"
alt="Version"></a><br>
<a href="https://github.com/TheWhatsBot/WhatsBot/wiki">
<img src="https://shields.io/badge/WIKI-red?style=for-the-badge"alt="Wiki"></a>
<a href="https://github.com/TheWhatsBot/WhatsBot/wiki/Demo">
<img src="https://shields.io/badge/DEMO-red?style=for-the-badge"alt="Demo"></a>
<a href="#deploy-">
<img src="https://shields.io/badge/DEPLOY-red?style=for-the-badge"alt="Deploy"></a>
<a href="#credits-">
<img src="https://shields.io/badge/Credits-red?style=for-the-badge"alt="Credits"></a>
<a href="#inspiration-">
<img src="https://shields.io/badge/Inspiration-red?style=for-the-badge"alt="Inspiration"></a>
<a href="#develop-">
<img src="https://shields.io/badge/Develop-red?style=for-the-badge"alt="Develop"></a><br>
<a href="https://github.com/cachecleanerjeet">
<img src="https://shields.io/badge/MADE WITH ♥ BY-TUHIN-red?style=for-the-badge"alt="Deploy"></a>
</p>

<br>

### Features :
- Modular
- Pmpermit Included
- Easily Deployable
- Ban Free (Using Whatsapp Web)
- Easy to Use
- Directory Listing in Web Server
- Terminal Included
- Encrypted Traffic

### Pre Added Plugins :
- **pmpermit** - Permission for direct message
- **term** - Terminal in Whatsapp
- **yt** - Download Youtube video from link
- **weather** - Lookup today's weather
- **carbon** - Generate beautiful image from text
- **jiosaavn** - Download a song from Jiosaavn Link
- **zee5** - Download a Zee5 content
- **qr** - Generate QR from text
- **directlink** - Get direct link of photos
- **tr** - Translate Text


### Deploy :
[![Deploy with Heroku](https://www.herokucdn.com/deploy/button.svg "Deploy with Heroku")](https://heroku.com/deploy?template=https://github.com/https://github.com/TheWhatsBot/WhatsBot "Deploy with Heroku")<br>
Read the [wiki](https://github.com/TheWhatsBot/WhatsBot/wiki/Deploy-with-Heroku) before Deploy it with Heroku<br><br>
[Deploy in VPS](https://github.com/TheWhatsBot/WhatsBot/wiki/Deploy-in-VPS)

### Develop :
*You can develop your own module for Whatsbot. Check out the [wiki](https://github.com/TheWhatsBot/WhatsBot/wiki/Development), It is very easy if you know Javascript.*

### How it works :
- Opened whatsapp web in server using puppeteer
- Listen messages and take action.

### Inspiration :
- [Userge](https://github.com/UsergeTeam/Userge "Userge") - This Project takes Pmpermit insprition from Userge

### Credits :
- [Whatsapp Web JS](https://github.com/pedroslopez/whatsapp-web.js/ "Whatsapp Web JS") - This project is fully depended on this Library
- [Carbon API](https://github.com/cyberboysumanjay/Carbon-API "Carbon API") - Thanks to [Sumanjay](https://github.com/cyberboysumanjay "Sumanjay") for his Carbon API
- [Google Translate API](https://github.com/iamtraction/google-translate-api "Google Translate API") - Unofficial Google Translator Library
- [Musicder](https://github.com/cachecleanerjeet/Musicder "Musicder") & [Jiosaavn API ](https://github.com/cachecleanerjeet/JiosaavnAPI "Jiosaavn API ") - For Jiosaavn Module
- [savefrom.net](https://savefrom.net/ "savefrom[dot]net") - For Youtube Module
- [Weather API](https://github.com/cachecleanerjeet/weather-api "Weather API") - For Weather Module

### License & Copyright :
- This Project is [Apache-2.0](https://github.com/TheWhatsBot/WhatsBot/blob/main/LICENSE) Licensed
- Copyright 2020 by [Tuhin Kanti Pal](https://github.com/cachecleanerjeet)

### Connect :
- [Channel](https://telegram.dog/tprojects)
- [Support Group](https://telegram.dog/t_projects)
43 changes: 43 additions & 0 deletions app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"name": "Whatsbot",
"description": "Modular Userbot for Whatsapp",
"repository": "https://github.com/TheWhatsBot/WhatsBot",
"logo": "https://telegra.ph/file/96ccad5945c18944c5f15.png",
"keywords": [
"whatsbot",
"whatsapp-userbot",
"whatsapp-bot",
"whatsapp-userbot",
"whatsapp"
],
"env": {
"SESSION": {
"description": "Puppeteer Session. Get it by running genToken.js",
"value": ""
},
"PMPERMIT_ENABLED": {
"description": "Enable Pmpermit write true or false only",
"value": "true"
},
"MONGODB_URL": {
"description": "MongoDB URL, Get it for free from cloud.mongodb.com",
"value": ""
},
"PMPERMIT_MUTETIME": {
"description": "How many seconds an user get muted if he is spamming. Default is 30 Minutes (1800 Secs)",
"value": "1800"
},
"YT_DATA_API_KEY": {
"description": "Youtube DATA API key, grab it from cloud.google.com",
"value": ""
},
"DEFAULT_TR_LANG": {
"description": "Default Translation Language",
"value": "en"
}
},
"buildpacks": [
{ "url": "heroku/nodejs" },
{ "url": "https://buildpack-registry.s3.amazonaws.com/buildpacks/jontewks/puppeteer.tgz" }
]
}
11 changes: 11 additions & 0 deletions config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Only Require if you are not using env vars
const fs = require('fs');

module.exports = {
session: JSON.parse(process.env.SESSION || fs.readFileSync(__dirname + '/session.json', { encoding: 'utf8' })), //if not using config vars create a file and use
pmpermit_enabled: process.env.PMPERMIT_ENABLED || "true",
mongodb_url: process.env.MONGODB_URL || "",
pmpermit_mutetime: process.env.PMPERMIT_MUTETIME || "1800",
yt_data_api_key: process.env.YT_DATA_API_KEY || "",
default_tr_lang: process.env.DEFAULT_TR_LANG || "en"
}
15 changes: 15 additions & 0 deletions genSession.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
const { Client } = require('whatsapp-web.js');
const qrcode = require('qrcode-terminal');

const client = new Client({ puppeteer: { headless: true, args: ['--no-sandbox'] } });
client.initialize();

client.on('qr', (qr) => {
console.log(`Scan this QR Code and copy the JSON\n`)
qrcode.generate(qr, { small: true });
});

client.on('authenticated', (session) => {
console.log(JSON.stringify(session))
process.exit()
});
Loading

0 comments on commit b034620

Please sign in to comment.