Skip to content

Commit 08a1e57

Browse files
Add files via upload
0 parents  commit 08a1e57

14 files changed

+308
-0
lines changed

Dockerfile

+80
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# We're using Debian Slim Buster image
2+
FROM python:3.8.5-slim-buster
3+
4+
ENV PIP_NO_CACHE_DIR 1
5+
6+
RUN sed -i.bak 's/us-west-2\.ec2\.//' /etc/apt/sources.list
7+
8+
# Installing Required Packages
9+
RUN apt update && apt upgrade -y && \
10+
apt install --no-install-recommends -y \
11+
debian-keyring \
12+
debian-archive-keyring \
13+
bash \
14+
bzip2 \
15+
curl \
16+
figlet \
17+
git \
18+
util-linux \
19+
libffi-dev \
20+
libjpeg-dev \
21+
libjpeg62-turbo-dev \
22+
libwebp-dev \
23+
linux-headers-amd64 \
24+
musl-dev \
25+
musl \
26+
neofetch \
27+
php-pgsql \
28+
python3-lxml \
29+
postgresql \
30+
postgresql-client \
31+
python3-psycopg2 \
32+
libpq-dev \
33+
libcurl4-openssl-dev \
34+
libxml2-dev \
35+
libxslt1-dev \
36+
python3-pip \
37+
python3-requests \
38+
python3-sqlalchemy \
39+
python3-tz \
40+
python3-aiohttp \
41+
openssl \
42+
pv \
43+
jq \
44+
wget \
45+
python3 \
46+
python3-dev \
47+
libreadline-dev \
48+
libyaml-dev \
49+
gcc \
50+
sqlite3 \
51+
libsqlite3-dev \
52+
sudo \
53+
zlib1g \
54+
ffmpeg \
55+
libssl-dev \
56+
libgconf-2-4 \
57+
libxi6 \
58+
xvfb \
59+
unzip \
60+
libopus0 \
61+
libopus-dev \
62+
&& rm -rf /var/lib/apt/lists /var/cache/apt/archives /tmp
63+
64+
# Pypi package Repo upgrade
65+
RUN pip3 install --upgrade pip setuptools
66+
67+
# Copy Python Requirements to /root/FallenRobot
68+
RUN git clone https://github.com/AnonymousX1025/FallenRobot /root/FallenRobot
69+
WORKDIR /root/FallenRobot
70+
71+
#Copy config file to /root/FallenRobot/FallenRobot
72+
COPY ./FallenRobot/config.py ./FallenRobot/config.py* /root/FallenRobot/FallenRobot/
73+
74+
ENV PATH="/home/bot/bin:$PATH"
75+
76+
# Install requirements
77+
RUN pip3 install -U -r requirements.txt
78+
79+
# Starting Worker
80+
CMD ["python3","-m","FallenRobot"]

Git_Pull.bat

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
@echo off
2+
TITLE Github Quick-Pull
3+
4+
:: Print the branch cause ..oooooo fancy!
5+
echo Pulling from branch:
6+
git branch
7+
echo.
8+
git pull

Git_Push.bat

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
@echo off
2+
TITLE Github Quick-pushing
3+
4+
:: Print the branch cause people like me push to wrong branches and cry about it later.
5+
echo Pushing to branch:
6+
git branch
7+
echo.
8+
:: Take input for comment and thats about it
9+
set /p commit_title="Enter Commit title (pushes with you as author): "
10+
11+
:: If you are reading comments to understand this part then you can go back stab yourself.
12+
echo.
13+
git pull
14+
git add *
15+
git commit -m "%commit_title%"
16+
git push

LICENSE.txt

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2022 AnonymousX1025
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

Procfile

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
worker: python3 -m FallenRobot

Setup venv.bat

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
TITLE Setting up virtual env
2+
:: Running it once is fine, this just sets up virtual env >> install all modules there
3+
py -m venv env && env\scripts\activate.bat && pip install -r requirements.txt
4+
5+
:: Note to rerun the requirements.txt in case you ever add a module.
6+
:: Running this multiple time will not make a mess of your setup, dont worry about that bit.

_config.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
theme: jekyll-theme-architect

app.json

+87
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
{
2+
"name": "BRANDED ROBOT",
3+
"description": "Branded Management Bot.",
4+
"logo": "https://te.legra.ph/file/6a4ac076ff159bdcf9656.jpg",
5+
"keywords": [
6+
"telegram",
7+
"modular",
8+
"group",
9+
"manager",
10+
"Fallen"
11+
],
12+
"repository": "https://github.com/WCGKING/BRANDED-ROBOT",
13+
"stack": "heroku-22",
14+
"addons": [
15+
{
16+
"options": {
17+
"version": "13"
18+
},
19+
"plan": "heroku-postgresql"
20+
}
21+
],
22+
"env": {
23+
"API_ID": {
24+
"description": "Get this value from my.telegram.org/apps.",
25+
"required": true,
26+
"value": ""
27+
},
28+
"API_HASH": {
29+
"description": "Get this value from my.telegram.org/apps.",
30+
"required": true,
31+
"value": ""
32+
},
33+
"ALLOW_EXCL": {
34+
"description": "Set this to True if you want ! to be a command prefix along with /. Recommended is True",
35+
"value": "True"
36+
},
37+
"CASH_API_KEY": {
38+
"description": "Required for currency converter. Get yours from https://www.alphavantage.co/support/#api-key",
39+
"required": true,
40+
"value": ""
41+
},
42+
"DEL_CMDS": {
43+
"description": "Set this to True if you want to delete command messages from users who don't have the perms to run that command.",
44+
"value": "True"
45+
},
46+
"ENV": {
47+
"description": "Setting this to ANYTHING will enable environment variables. Leave it as it is",
48+
"required": true,
49+
"value": "True"
50+
},
51+
"EVENT_LOGS": {
52+
"description": "Event logs channel to note down important bot level events, recommend to make this public. ex: '-123456'",
53+
"required": true,
54+
"value": ""
55+
},
56+
"MONGO_DB_URI": {
57+
"description": "Required for database connections.",
58+
"required": true,
59+
"value": ""
60+
},
61+
"OWNER_ID": {
62+
"description": "Your user ID as an integer.",
63+
"required": true,
64+
"value": "6258877205"
65+
},
66+
"START_IMG": {
67+
"description": "Telegraph link of the image which will be shown at start command.",
68+
"required": true,
69+
"value": ""
70+
},
71+
"SUPPORT_CHAT": {
72+
"description": "Your Telegram support group chat username where your users will go and bother you with shit But be like: MyGroupChatUsernameBlah. If this ever points to Fallen Support than consider you made an enemy.",
73+
"required": true,
74+
"value": "DevilsHeavenMF"
75+
},
76+
"TIME_API_KEY": {
77+
"description": "Required for timezone information. Get yours from https://timezonedb.com/api",
78+
"required": true,
79+
"value": ""
80+
},
81+
"TOKEN": {
82+
"description": "Get bot token from @BotFather on TG",
83+
"required": true,
84+
"value": ""
85+
}
86+
}
87+
}

heroku.yml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
build:
2+
docker:
3+
worker: Dockerfile
4+
run:
5+
worker: python3 -m FallenRobot

requirements.txt

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
aiofiles==23.2.1
2+
aiohttp==3.8.6
3+
apscheduler==3.6.3
4+
asyncio==3.4.3
5+
beautifulsoup4==4.12.3
6+
bing_image_downloader==1.1.2
7+
bleach==6.1.0
8+
bs4==0.0.2
9+
cachetools==4.2.2
10+
countryinfo==0.1.2
11+
currencyconverter==0.17.21
12+
dateparser==1.2.0
13+
emoji==2.11.1
14+
emoji-country-flag==1.3.2
15+
feedparser==6.0.11
16+
future==1.0.0
17+
geopy==2.4.1
18+
gpytranslate==1.5.1
19+
hachoir==3.3.0
20+
html2text==2024.2.26
21+
jikanpy==4.3.2
22+
lxml==4.9.4
23+
markdown2==2.4.13
24+
motor==3.4.0
25+
opencv-python-headless==4.9.0.80
26+
pillow==10.2.0
27+
pretty_errors==1.2.25
28+
psutil==5.9.8
29+
psycopg2-binary==2.9.9
30+
pydictionary==2.0.1
31+
pykeyboard==0.1.5
32+
pynewtonmath==1.0.1
33+
pyrate-limiter==3.1.0
34+
pyrogram==2.0.106
35+
python-telegram-bot==13.15
36+
regex==2024.5.10
37+
requests==2.31.0
38+
secureme==0.0.4
39+
search_engine_parser==0.6.8
40+
speedtest-cli==2.1.3
41+
sqlalchemy==1.4.46
42+
telegraph==2.2.0
43+
telethon==1.35.0
44+
tgcrypto==1.2.5
45+
wikipedia==1.4.0

restart.bat

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
:: starts a cmd to silently start the bat file, just another dirty way of getting things done for my env on windows
2+
start cmd.exe /c start_service.bat

runtime.txt

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
python-3.10.13

start.bat

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
@echo off
2+
TITLE Fallen Robot
3+
:: Enables virtual env mode and then starts Fallen
4+
env\scripts\activate.bat && py -m FallenRobot

start_service.bat

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
@echo off
2+
:: This runs the batch file as an admin - required UAC to be off
3+
:: This is just an asty hack in to get job done cause we host it on windows dedi.
4+
:: BatchGotAdmin
5+
:-------------------------------------
6+
REM --> Check for permissions
7+
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
8+
9+
REM --> If error flag set, we do not have admin.
10+
if '%errorlevel%' NEQ '0' (
11+
echo Requesting administrative privileges...
12+
goto UACPrompt
13+
) else ( goto gotAdmin )
14+
15+
:UACPrompt
16+
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
17+
set params = %*:"=""
18+
echo UAC.ShellExecute "cmd.exe", "/c %~s0 %params%", "", "runas", 1 >> "%temp%\getadmin.vbs"
19+
20+
"%temp%\getadmin.vbs"
21+
del "%temp%\getadmin.vbs"
22+
exit /B
23+
24+
:gotAdmin
25+
pushd "%CD%"
26+
CD /D "%~dp0"
27+
:--------------------------------------
28+
:: your commands begin from this point.
29+
:: stops the service and then starts it
30+
net stop FallenRobot
31+
net start FallenRobot

0 commit comments

Comments
 (0)