Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RizkyBot #5

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open
16 changes: 9 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ RUN sed -e 's;^#http\(.*\)/edge/community;http\1/edge/community;g' -i /etc/apk/r
#
# Installing Packages
#
RUN apk add --no-cache --update \
bash \
RUN apk add --no-cache=true --update \
bash \
build-base \
bzip2-dev \
curl \
Expand All @@ -22,8 +22,6 @@ RUN apk add --no-cache --update \
aria2 \
util-linux \
libevent \
chromium \
chromium-chromedriver \
jpeg-dev \
libffi-dev \
libpq \
Expand All @@ -43,16 +41,20 @@ RUN apk add --no-cache --update \
jq \
wget \
python \
python-dev \
python3 \
python3-dev \
readline-dev \
sqlite \
ffmpeg \
sqlite-dev \
sudo \
chromium \
chromium-chromedriver \
zlib-dev \
jpeg-dev \
python-dev
jpeg




RUN python3 -m ensurepip \
Expand All @@ -65,7 +67,7 @@ RUN python3 -m ensurepip \
#
# Clone repo and prepare working directory
#
RUN git clone https://github.com/Spyderzz/Userbot/root/userbot
RUN git clone -b master https://github.com/MuhamadFajarGaray/UserBug /root/userbot
RUN mkdir /root/userbot/bin/
WORKDIR /root/userbot/

Expand Down
6 changes: 5 additions & 1 deletion Procfile
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
worker: python3 -m userbot
build:
docker:
worker: Dockerfile
run:
worker: python3 -m userbot
53 changes: 19 additions & 34 deletions app.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
{
"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",
"name": "Telegram Open User Bot",
"description": "[OpenUserBot] A modular Telegram userbot running on Python 3.7+ with an sqlalchemy database.",
"logo": "https://telegra.ph/file/d04a1724c6dd8a957bd0e.png",
"keywords": [
"telegram",
"userbot",
"plugin",
"modular",
"productivity"
],
"repository": "https://github.com/AvinashReddy3108/PaperplaneExtended",
"website": "https://telegra.ph/How-to-host-a-Telegram-Userbot-07-24",
"success_url": "https://t.me/PaperplaneExtended",
"repository": "https://github.com/mkaraniya/OpenUserBot",
"website": "https://telegra.ph/How-to-host-a-Telegram-Userbot-11-02",
"success_url": "https://t.me/PPE_Support",
"stack": "container",
"env": {
"API_KEY": {
"description": "Get this value from my.telegram.org.",
Expand All @@ -26,14 +27,10 @@
"required": true
},
"HEROKU_MEMEZ": {
"description": "This should be True if the userbor is running on a Heroku Dyno.",
"description": "This should be True if the userbot is running on a Heroku Dyno.",
"value": "True",
"required": true
},
"UPSTREAM_REPO_URL": {
"description": "In case you maintain a fork, add your repo URL here.",
"required": false
},
"HEROKU_API_KEY": {
"description": "Your Heroku API key, get it from 'https://dashboard.heroku.com/account'",
"value": ""
Expand All @@ -42,6 +39,10 @@
"description": "Add the Heroku app name here. It helps with userbot updates.",
"required": false
},
"UPSTREAM_REPO_URL": {
"description": "In case you maintain a fork, add your repo URL here.",
"required": false
},
"COUNTRY": {
"description": "Set your Country to be used in the .time and .date commands.",
"required": false
Expand All @@ -53,12 +54,12 @@
},
"CHROME_DRIVER": {
"description": "ChromeDriver location for selenium based modules.",
"value": "/app/.chromedriver/bin/chromedriver",
"value": "/usr/bin/chromedriver",
"required": false
},
"GOOGLE_CHROME_BIN": {
"description": "Google Chrome (or) Chromium binary location for selenium based modules.",
"value": "/app/.apt/usr/bin/google-chrome",
"value": "/usr/bin/chromium-browser",
"required": false
},
"OPEN_WEATHER_MAP_APPID": {
Expand Down Expand Up @@ -135,7 +136,7 @@
},
"DEFAULT_BIO": {
"description": "Default profile bio.",
"value": "[PM = Report Spam] Beware of my userbot.",
"value": "[PM = Report Spam] I ❤ ️@OpenUserBot",
"required": false
},
"ALIVE_NAME": {
Expand All @@ -150,6 +151,10 @@
"description": "Enter the Google Drive authentication data, as a JSON structure.",
"required": false
},
"LYDIA_API_KEY": {
"description": "This Module Needs CoffeeHouse API to work. so Join https://telegram.dog/IntellivoidDev and send #activateapi and follow instructions.",
"required": false
},
"WEATHER_DEFCITY": {
"description": "Set the default city for the userbot's weather module.",
"required": false
Expand All @@ -166,25 +171,5 @@
"version": "9.5"
}
}
],
"buildpacks": [
{
"url": "https://github.com/jonathanong/heroku-buildpack-ffmpeg-latest"
},
{
"url": "https://github.com/opendoor-labs/heroku-buildpack-p7zip"
},
{
"url": "https://github.com/amivin/aria2-heroku"
},
{
"url": "https://github.com/heroku/heroku-buildpack-google-chrome"
},
{
"url": "https://github.com/heroku/heroku-buildpack-chromedriver"
},
{
"url": "heroku/python"
}
]
}
10 changes: 5 additions & 5 deletions init/init_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ echo "$1=y" >> $prog_f

# Welcome Message
welcome() {
echo "*****Welcome to AvinashReddy3108's userbot setup*****
echo "*****Welcome to mkaraniya's userbot setup*****
This Guided Setup shall help you get your own userbot up and running.
You might be asked for sudo password several number of times."
}
Expand All @@ -40,15 +40,15 @@ packageinstall() {
sudo apt --yes --force-yes install build-essential checkinstall git \
libreadline-gplv2-dev libncursesw5-dev libssl-dev wget \
libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev
sudo apt --yes --force-yes install python3.7 docker
sudo apt --yes --force-yes install python3.8 docker
}

# Clone the required repo
botclone() {
cd ~
echo "Cloning bot sources..."
if [ -z "$bot_clone" ]; then
git clone https://github.com/AvinashReddy3108/Telegram-UserBot -b master
git clone https://github.com/MuhamadFajarGaray/UserBug -b master
save_prog "bot_clone"
fi
echo "DONE!!"
Expand All @@ -59,7 +59,7 @@ botclone() {
reqinstall() {
echo "***Installing Requirements***"
if [ -z "$req" ]; then
sudo python3.7 -m pip install -r requirements.txt
sudo python3.8 -m pip install -r requirements.txt
clear
save_prog "req"
fi
Expand Down Expand Up @@ -136,7 +136,7 @@ session() {
echo "Generating session..."
if [ -z "$sess" ]; then
python3 windows_startup_script.py
python3.7 -m userbot test
python3.8 -m userbot test
save_prog "sess"
fi
echo "DONE!!"
Expand Down
2 changes: 1 addition & 1 deletion init/telegram
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ kickstart_pub() {
"Branch <code>${PARSE_BRANCH}</code>" \
"Commit Point <code>${COMMIT_POINT}</code>" \
" " \
"<b>Github Link: </b> https://github.com/AvinashReddy3108/telegram-userbot/commit/${COMMIT_HASH}" \
"<b>Github Link: </b> https://github.com/MuhamadFajarGaray/UserBug/commit/${COMMIT_HASH}" \
" " \
"<b>CI Link: </b> https://semaphoreci.com/baalajimaestro/telegram-userbot"
}
Expand Down
2 changes: 1 addition & 1 deletion init/telegramapi
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

VERSION="0.2"
VERSION="0.3"
TOKEN=""
CHATS=()
DEBUG=false
Expand Down
8 changes: 5 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ aria2p
async_generator
bs4
cowpy
cryptg
# cryptg
cffi>=1.0.0
dnspython
emoji
gitpython
Expand All @@ -14,7 +15,6 @@ google_images_download>=2.7.1
gTTS>=2.0.1
gTTS-token>=1.1.3
hachoir
heroku3
httplib2
humanize
lxml
Expand All @@ -34,7 +34,9 @@ requests>=2.18.4
search-engine-parser>=0.4.2
speedtest-cli>=2.0.2
sqlalchemy>=1.2
telethon>=1.10.6
telethon>=1.10.10
telethon-session-sqlalchemy>=0.2.6
urbandict>=0.5
wikipedia>=1.4.0
coffeehouse
telegraph
2 changes: 1 addition & 1 deletion runtime.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
python-3.7.5
python-3.8.1
5 changes: 5 additions & 0 deletions sample_config.env
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ BIO_PREFIX = ""
# default bio message
DEFAULT_BIO = ""

# FOR Lydia Access
LYDIA_API_KEY = ""
LYDIA_ANTI-PM = ""


# Report or kick some known spammer bots after
# they joins
ANTI_SPAMBOT = False
Expand Down
47 changes: 32 additions & 15 deletions termux_install.sh
Original file line number Diff line number Diff line change
@@ -1,24 +1,41 @@
clear
echo -E " ____ __ "
echo -E " / __ \____ _____ ___ _________ / /___ _____ ___ "
echo -E " / /_/ / __ `/ __ \/ _ \/ ___/ __ \/ / __ `/ __ \/ _ \ "
echo -E " / ____/ /_/ / /_/ / __/ / / /_/ / / /_/ / / / / __/ "
echo -E "/_/ \__,_/ .___/\___/_/ / .___/_/\__,_/_/ /_/\___/ "
echo -E " /_/ /_/ "
echo -E " ______ __ __ __ "
echo -E " / ____/ __/ /____ ____ ____/ /__ ____/ / "
echo -E " / __/ | |/_/ __/ _ \/ __ \/ __ / _ \/ __ / "
echo -E " / /____> </ /_/ __/ / / / /_/ / __/ /_/ / "
echo -E " /_____/_/|_|\__/\___/_/ /_/\__,_/\___/\__,_/ "
echo -E " "
echo -E " ******,*,. ... "
echo -E " /////*****,*... . . "
echo -E " . . /((//*/*,*///*. . .. "
echo -E ".. . . .((*,,. .*//*. . . . .. "
echo -E ". . ../(((**((//,,/.......... .. .. .. "
echo -E ". . . ./(/, ., , . . ...... "
echo -E "..,,.... .. .. . **//*/*/*.... . . ...*,. "
echo -E " .,,,..,,,.,...... //((/. /**,. ... .. .....,*,** "
echo -E " /(/(*,/// ..,,,,,,,.,,,,,,,,*, "
echo -E ". ((((((/ ., . ..**** "
echo -E "....... */(##//((/ ,.*, ..... .,,,*** "
echo -E "......................../((##(((###( .,.,. ,.... . ,.,*/ "
echo -E " ...*, *,,...,//(((((((####(((*,.**.. **, ,*/***((# "
echo -E " *((/,***(((((((((####((//*/*,,**(//(//(//((((( "
echo -E " .(/ ,(#((((###((((((((#((/(#(*(#/(*((/((((.*,(//// "
echo -E " (((//(( (###(((((/(##(*/((.(#/##((((((/**(/(#*( "
echo -E "/////**/ /((//,*,,../(/,((((/((#(##/(*(/#%#(((/(((/. *****/ "
echo -E " .*////(/((/(/*,**/((((##((//.,####/((#(#%#(((((((/ , .**** "
echo -E ". /(//(#( (#(#(*,/#(#/#####%##(((((((/(////*, "
echo -E "........ ((/((#( /((#(((/ /((#/###%%%#(((/(((//////(( "
echo -E "........./((#(#*.... ((,(((((# /((#((#%%%/* **((. . .., "
echo -E "........./((#(/(.......((((((///(/*((#((%%%%%##(((,*/. , . "
echo -E "........./((((((......*###(((/(/*(# ####%%%%#(.*((..,. "
echo -E ".........((####(......(#(##.(#(((,*((.#%%%%##(*((/..,,*. "
echo -E "//(/***,*(###(//,,..,///#/(. /(((/((((*#%%##(/(,,,.. "
echo -E "**/**,,,,####(/**//((////(##(.*..*((/*##%%%(((,/ .,/ . "
echo -E ",,,,,,,,,#####%(,*///////(((((/(((((((###%##//*., ,/. "
echo -E ",,,,,,,,,#####%(,,,,///((((((///*.,.. (##((((#/(*///*.. "
echo -E " "
sleep 5
clear

pkg update && pkg upgrade -y
pkg install clang curl git libcrypt libffi libiconv libjpeg* libjpeg-turbo libwebp libxml2 libxslt make ndk-sysroot openssl postgresql python readline wget zlib -y

git clone https://github.com/Spyderzz/Userbot.git
cd PaperplaneExtended
git clone https://github.com/mkaraniya/OpenUserBot.git
cd OpenUserBot

pip install --upgrade pip setuptools
pip install -r requirements.txt
Expand All @@ -33,7 +50,7 @@ createuser botuser

cd ..
echo "pg_ctl -D $PREFIX/var/lib/postgresql start" > startbot.sh
echo "cd PaperplaneExtended" >> startbot.sh
echo "cd OpenUserBot" >> startbot.sh
echo "python3 -m userbot" >> startbot.sh
chmod 755 startbot.sh

Expand Down
Loading