Skip to content

Commit

Permalink
Paperplane Extended [24/09/2019] [v5.0]
Browse files Browse the repository at this point in the history
Here's what new in this update.

- Slimmed down the Dockerfile for added performance.
- Upgraded Telethon to the latest stable version.
- Switched from broken pytube to youtube-dl for media scraping modules.
- Reworked the welcomes, snips, notes and filters to avoid FILE_ID expiry error. (This has made it compulsory for you to have a valid BOTLOG_CHATID set for your userbot.)
- Optimized the errors_handler for error log generation.
- The unsafe triggers for command prefix is now defined in the wrapper instead of the module code.
- Now, kicks should not ban users from the chat.
- Made few commands shorter and easier to use.
- Admin commands like kicks, (g)mutes, and bans can now take an extra (optional) parameter to show reason.
- The promote command can now take an extra (optional) parameter, to give new admins a custom rank.
- The delusers module now has better probability in removing all deleted accounts from the chat.
- Rolled back to memory based AFK instead of db for better NON-SQL support, plus some sneaky surprises.
- Minor improvements in the Android related modules.
- Added the ability to fetch torrents using the new Aria module.
- Added the mention module back on popular demand.
- Added ability to upload directories into Google Drive. [BETA, expect bugs]
- Added ability to search for stuff within your Google Drive storage.
- Added some new memes, check them out.
- Added some developer tools for easier module development.
- The PMPermit and AutoApprove feature are much saner now.
- Added ability to select separate languages for TTS and TRT modules, plus additional assistance in setting up the language codes.
- Adapted the carbon.now.sh scraper to the changes in website.
- Asynced some helper functions, should not be blocking other modules when using those.
- Added a new spam module, enjoy (Don't blame me for getting banned tho.)
- Reworked the time and date module to handle countries with many timezones.

Plus lots of minor improvements and fixes, enjoy !!

Co-authored-by: baalajimaestro <[email protected]>
Co-authored-by: Gegham Zakaryan <[email protected]>
Co-authored-by: Raphiel Rollerscaperers <[email protected]>
Co-authored-by: Kandarp <[email protected]>
Co-authored-by: Shrimadhav U K <[email protected]>
Co-authored-by: jaskaranSM <[email protected]>
  • Loading branch information
7 people committed Sep 25, 2019
1 parent 50fff15 commit bbbf91a
Show file tree
Hide file tree
Showing 54 changed files with 5,443 additions and 5,564 deletions.
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
config.env
__pycache__/*
brains.check
learning-data-root.check
userbot.db
userbot.session
userbot.session-journal
userbot/__pycache__/*
userbot/modules/__pycache__/*
userbot/modules/sql_helper/__pycache__/*
.progress
.vscode/*
.vscode/*
bin/*
62 changes: 28 additions & 34 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
# We're using Alpine stable
# We're using Alpine Edge
FROM alpine:edge

#
# We have to uncomment Community repo for some packages
#
RUN sed -e 's;^#http\(.*\)/v3.9/community;http\1/v3.9/community;g' -i /etc/apk/repositories
RUN sed -e 's;^#http\(.*\)/edge/community;http\1/edge/community;g' -i /etc/apk/repositories

# Installing Python
#
# Installing Packages
#
RUN apk add --no-cache --update \
bash \
build-base \
bzip2-dev \
curl \
figlet \
gcc \
g++ \
git \
sudo \
aria2 \
util-linux \
chromium \
chromium-chromedriver \
Expand All @@ -30,62 +34,52 @@ RUN apk add --no-cache --update \
musl \
neofetch \
openssl-dev \
php-pgsql \
postgresql \
postgresql-client \
postgresql-dev \
py3-lxml \
py3-pillow \
py3-pip \
py3-setuptools \
py3-psycopg2 \
py3-requests \
py3-sqlalchemy \
py3-tz \
py3-aiohttp \
python-dev \
openssl \
pv \
jq \
wget \
python \
python3 \
python3-dev \
readline-dev \
sqlite \
ffmpeg \
sqlite-dev \
sudo \
zlib-dev

# Copy Python Requirements to /app

RUN sed -e 's;^# \(%wheel.*NOPASSWD.*\);\1;g' -i /etc/sudoers
RUN adduser userbot --disabled-password --home /home/userbot
RUN adduser userbot wheel
USER userbot
RUN mkdir /home/userbot/userbot
RUN mkdir /home/userbot/bin
RUN git clone https://github.com/AvinashReddy3108/PaperplaneExtended /home/userbot/userbot
WORKDIR /home/userbot/userbot
ADD ./requirements.txt /home/userbot/userbot/requirements.txt
RUN python3 -m ensurepip \
&& pip3 install --upgrade pip setuptools \
&& rm -r /usr/lib/python*/ensurepip && \
if [ ! -e /usr/bin/pip ]; then ln -s pip3 /usr/bin/pip ; fi && \
if [[ ! -e /usr/bin/python ]]; then ln -sf /usr/bin/python3 /usr/bin/python; fi && \
rm -r /root/.cache

#
# Clone repo and prepare working directory
#
RUN git clone -b sql-extended https://github.com/AvinashReddy3108/PaperplaneExtended /root/userbot
RUN mkdir /root/userbot/bin/
WORKDIR /root/userbot/

#
# Copies session and config(if it exists)
# Copies session and config (if it exists)
#
COPY ./sample_config.env ./userbot.session* ./config.env* /home/userbot/userbot/
COPY ./sample_config.env ./userbot.session* ./config.env* /root/userbot/

#
# Clone helper scripts
#
RUN curl -s https://raw.githubusercontent.com/yshalsager/megadown/master/megadown -o /home/userbot/bin/megadown && sudo chmod a+x /home/userbot/bin/megadown
RUN curl -s https://raw.githubusercontent.com/yshalsager/cmrudl.py/master/cmrudl.py -o /home/userbot/bin/cmrudl && sudo chmod a+x /home/userbot/bin/cmrudl
ENV PATH="/home/userbot/bin:$PATH"
RUN curl -s https://raw.githubusercontent.com/yshalsager/megadown/master/megadown -o /root/userbot/bin/megadown && sudo chmod a+x /root/userbot/bin/megadown
RUN curl -s https://raw.githubusercontent.com/yshalsager/cmrudl.py/master/cmrudl.py -o /root/userbot/bin/cmrudl && sudo chmod a+x /root/userbot/bin/cmrudl
ENV PATH="/root/userbot/bin:$PATH"

#
# Install requirements
#
RUN sudo pip3 install -r requirements.txt
ADD . /home/userbot/userbot
RUN sudo chown -R $(whoami) /usr/lib/python3.7/site-packages
RUN sudo chown -R userbot /home/userbot/userbot
RUN sudo chmod -R 777 /home/userbot/userbot
RUN pip3 install -r requirements.txt
CMD ["python3","-m","userbot"]
83 changes: 19 additions & 64 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,64 +1,19 @@
# Project Paperplane Extended

### **A modular Telegram userbot running on Python 3.6+ with an sqlalchemy database.**

#### The easiest way to deploy this bad boy !!

[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/AvinashReddy3108/PaperplaneExtended/tree/sql-extended)

#include <std/disclaimer.h>
/**
Your Telegram account may get banned.

I am not responsible for ANY improper use of this bot.

This userbot is intended for the purpose of having fun with memes,
as well as efficiently managing groups.

You ended up spamming groups, getting reported left and right,
and you ended up in a Finale Battle with Telegram and at the end
Telegram Team deleted your account?

And after that, then you pointed your fingers at us
for getting your acoount deleted?

I will be rolling on the floor laughing at you.
/**

This is a fork of the famous [Paperplane](https://github.com/RaphielGang/Telegram-UserBot) userbot made by the awesome [RaphielGang](https://github.com/RaphielGang) team with some extras from the Telegram userbot community.

For setting up and configuring this userbot, you can checkout the [Wiki](https://telegra.ph/How-to-host-a-Telegram-Userbot-07-24)

If you just want to stay in the loop about new features or
announcements you can join the [news channel](https://t.me/PaperplaneExtended).

If you find any bugs or have any suggestions then don’t hesitate to contact me in my [Fan Club](https://t.me/PaperplaneExtendedChat).

### Credits:

I would like to thank people who assisted me throughout this project:

* [@YouTwitFace](https://github.com/YouTwitFace)
* [@TheDevXen](https://github.com/TheDevXen)
* [@Skittles9823](https://github.com/Skittles9823)
* [@deletescape](https://github.com/deletescape)
* [@songotenks69](https://github.com/songotenks69)
* [@Ovenoboyo](https://github.com/Ovenoboyo)
* [@SphericalKat](https://github.com/ATechnoHazard)
* [@nitanmarcell](https://www.github.com/nitanmarcel)
* [@spechide](https://www.github.com/spechide)
* [@Jeepeo](https://github.com/Jeepeo)
* [@shxnpie](https://github.com/shxnpie)
* [@rupansh](https://github.com/rupansh)
* [@zakaryan2004](https://github.com/zakaryan2004)
* [@kandnub](https://github.com/kandnub)
* [@pqhaz](https://github.com/pqhaz)
* [@Zero_cool7870](https://github.com/jaskaranSM)
* [@Prakasaka](https://github.com/Prakasaka)

and many more people and projects who aren’t mentioned here.

All features taken from them are copyrighted to their respespective, if you are handling the features/module
by them you need to strictly comply their respective LICENSE

Found Bugs? Create an issue on the issue tracker, or post it in the [Fan Club](https://t.me/PaperplaneExtendedChat).
<h1 align="center">Project Paperplane Extended</h1>
<h3 align="center">A modular Telegram userbot running on Python 3.6+ with an sqlalchemy database.</h3>
<h4 align="center">Based on RaphielGang's <a href="https://github.com/RaphielGang/Telegram-UserBot">Paperplane</a> Telegram userbot...</h4>
<h4 align="center">...or rather, it's Paperplane + insane extras from the community.</h4>
<p align="center"><a href="#how-to-host">How To Host</a> | <a href="#updates-and-support">Updates and Support</a> | <a href="#credits">Credits</a> | <a href="#license">License</a></p>
<p align="center">&nbsp;</p>
<h2 align="center">How To Host</h2>
<h5 align="center">The easiest way to deploy this derpfest!</h5>
<p align="center"><a href="https://heroku.com/deploy?template=https://github.com/AvinashReddy3108/PaperplaneExtended/tree/sql-extended"> <img src="https://www.herokucdn.com/deploy/button.svg" alt="Deploy to Heroku" /></a></p>
<p align="center">&nbsp;</p>
<h2 align="center">Credits</h2>
<p align="center">Huge thanks to <a href="https://github.com/AvinashReddy3108/PaperplaneExtended/graphs/contributors">everyone</a> who have helped make this userbot awesome!!</p>
<p align="center">&nbsp;</p>
<h2 align="center">Updates and Support</h2>
<p align="center">Join our <a href="https://t.me/PaperplaneExtended">Telegram Channel</a> for update notifications!</p>
<p align="center">Also join our <a href="https://t.me/PaperplaneExtendedSupport">Telegram Support Group</a> for help and support!</p>
<p align="center">&nbsp;</p>
<h2 align="center">License</h2>
<p align="center"><a href="https://github.com/AvinashReddy3108/PaperplaneExtended/blob/sql-extended/LICENSE">Raphielscape Public License</a> - Version 1.c, June 2019</p>
4 changes: 2 additions & 2 deletions app.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Paperplane Extended - Telegram Userbot",
"description": "A modular Telegram userbot running on Python 3.6+ with an sqlalchemy database.",
"name": "Telegram User Bot",
"description": "[Paperplane Extended] A modular Telegram userbot running on Python 3.6+ with an sqlalchemy database.",
"logo": "https://i.imgur.com/ATSG4w3.png",
"keywords": [
"telegram",
Expand Down
7 changes: 4 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
aiohttp
aria2p
async_generator
bs4
cowpy
Expand All @@ -25,14 +26,14 @@ pylast
pySmartDL
python-barcode
python-dotenv
pytube>=9.5.1
youtube-dl
pytz
qrcode
requests>=2.18.4
search-engine-parser
search-engine-parser>=0.4.2
speedtest-cli>=2.0.2
sqlalchemy>=1.2
telethon>=1.9
telethon>=1.10.3
telethon-session-sqlalchemy>=0.2.6
urbandict>=0.5
wikipedia>=1.4.0
Loading

0 comments on commit bbbf91a

Please sign in to comment.