forked from jankarikiduniya/AasthaTGMusicBot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup
93 lines (81 loc) · 5.77 KB
/
setup
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
### Aastha Music Bot Installer
cgreen='\033[0;32m'
cyellow='\033[0;33m'
cpurple='\033[0;35m'
update() {
sudo apt-get update && sudo apt-get upgrade -y
}
pprint (){
printf """$cpurple $1"""
}
packages(){
sudo apt-get install python3-pip ffmpeg -y
}
node(){
curl -fssL https://deb.nodesource.com/setup_17.x | sudo -E bash - && sudo apt-get install nodejs -y && npm i -g npm
}
repo(){
git clone https://github.com/notreallyshikhar/AasthaMusicBot && cd AasthaMusicBot
}
installation(){
pip3 install -U -r requirements.txt
}
clear
pprint "\u0057\u0065\u006c\u0063\u006f\u006d\u0065\u0020\u0074\u006f\u0020\u0041\u006c\u0065\u0078\u0061\u0020\u004d\u0075\u0073\u0069\u0063\u0020\u0042\u006f\u0074\u0020\u0053\u0065\u0074\u0075\u0070\u0020\u0049\u006e\u0073\u0074\u0061\u006c\u006c\u0065\u0072\n\n"
pprint "\x49\x66\x20\x79\x6F\x75\x20\x73\x65\x65\x20\x61\x6E\x79\x20\x65\x72\x72\x6F\x72\x20\x64\x75\x72\x69\x6E\x67\x20\x49\x6E\x73\x74\x61\x6C\x6C\x61\x74\x69\x6F\x6E\x20\x50\x72\x6F\x63\x65\x73\x73\x2C\x20\x50\x6C\x65\x61\x73\x65\x20\x72\x65\x66\x65\x72\x20\x74\x6F\x20\x74\x68\x65\x73\x65\x20\x66\x69\x6C\x65\x73\x20\x66\x6F\x72\x20\x6C\x6F\x67\x73\x3A\x20"
pprint "\n\x46\x6F\x72\x20\x6E\x6F\x64\x65\x20\x6A\x73\x20\x65\x72\x72\x6F\x72\x73\x20\x2C\x20\x43\x68\x65\x63\x6B\x6F\x75\x74\x20\x6E\x6F\x64\x65\x6C\x6F\x67\x2E\x74\x78\x74"
pprint "\n\x46\x6F\x72\x20\x70\x79\x70\x69\x20\x70\x61\x63\x6B\x61\x67\x65\x73\x20\x65\x72\x72\x6F\x72\x73\x20\x2C\x20\x43\x68\x65\x63\x6B\x6F\x75\x74\x20\x70\x79\x70\x69\x6C\x6F\x67\x2E\x74\x78\x74"
sleep 5
pprint "\n\n\x53\x74\x61\x72\x74\x69\x6E\x67\x20\x55\x70\x64\x61\x74\x65\x20\x61\x6E\x64\x20\x49\x6E\x73\x74\x61\x6C\x6C\x69\x6E\x67\x2C\x20\x50\x6C\x65\x61\x73\x65\x20\x64\x6F\x6E\x74\x20\x50\x72\x65\x73\x73\x20\x61\x6E\x79\x20\x6B\x65\x79\x20\x74\x69\x6C\x6C\x20\x79\x6F\x75\x20\x61\x72\x65\x20\x61\x73\x6B\x65\x64\x20\x74\x6F\x20\x74\x79\x70\x65\x20\x79\x6F\x75\x72\x20\x76\x61\x6C\x75\x65\x73\x2E\n\n"
update &> /dev/null
pprint "\x55\x70\x64\x61\x74\x65\x20\x48\x61\x73\x20\x42\x65\x65\x6E\x20\x43\x6F\x6D\x70\x6C\x65\x74\x65\x64\x2C\x20\x4E\x6F\x77\x20\x49\x6E\x73\x74\x61\x6C\x6C\x69\x6E\x67\x20\x20\x4E\x65\x63\x65\x73\x73\x6F\x72\x79\x20\x50\x61\x63\x6B\x61\x67\x65\x73\x21\n\n"
packages &> /dev/null
pprint "\x50\x61\x63\x6B\x61\x67\x65\x73\x20\x49\x6E\x73\x74\x61\x6C\x6C\x65\x64\x20\x53\x75\x63\x63\x65\x73\x73\x66\x75\x6C\x6C\x79\x21\x2C\x20\x49\x6E\x73\x74\x61\x6C\x6C\x69\x6E\x67\x20\x4E\x6F\x64\x65\x6A\x73\x20\x61\x6E\x64\x20\x4E\x70\x6D\x21\n\n"
node &> nodelog.txt
pprint "\x4E\x6F\x64\x65\x6A\x73\x20\x49\x6E\x73\x74\x61\x6C\x6C\x65\x64\x20\x53\x75\x63\x63\x65\x73\x73\x66\x75\x6C\x6C\x79\x21\x2C\x20\x4E\x6F\x77\x20\x49\x6E\x73\x74\x61\x6C\x6C\x69\x6E\x67\x20\x50\x79\x70\x69\x20\x50\x61\x63\x6B\x61\x67\x65\x73\x21\n\n"
installation > pypilog.txt
pprint "\n\n\n\n\n\n\n\n\x59\x75\x6B\x6B\x69\x20\x4D\x75\x73\x69\x63\x20\x42\x6F\x74\x20\x49\x6E\x73\x74\x61\x6C\x6C\x61\x74\x69\x6F\x6E\x20\x43\x6F\x6D\x70\x6C\x65\x74\x65\x64\x21"
sleep 5
clear
pprint "\x49\x66\x20\x79\x6F\x75\x20\x73\x61\x77\x20\x61\x6E\x79\x20\x65\x72\x72\x6F\x72\x73\x20\x6F\x6E\x20\x74\x68\x65\x20\x6C\x61\x73\x74\x20\x70\x61\x67\x65\x2C\x20\x50\x6C\x65\x61\x73\x65\x20\x74\x72\x79\x20\x72\x65\x20\x65\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x74\x68\x65\x20\x73\x63\x72\x69\x70\x74\x21"
sleep 5
pprint "\n\x45\x6E\x74\x65\x72\x20\x59\x6F\x75\x72\x20\x56\x61\x6C\x75\x65\x73\x20\x42\x65\x6C\x6F\x77\n\n\n"
pprint "\x41\x50\x49\x20\x49\x44\x3A\x20 "
read api_id
sleep 1
pprint "\n\x41\x50\x49\x20\x48\x41\x53\x48\x3A "
read api_hash
sleep 1
pprint "\n\x42\x4F\x54\x20\x54\x4F\x4B\x45\x4E\x3A "
read bot_token
sleep 1
pprint "\n\x4D\x4F\x4E\x47\x4F\x20\x44\x42\x20\x55\x52\x49\x3A "
read mongo_db
sleep 1
pprint "\n\x4C\x4F\x47\x20\x47\x52\x4F\x55\x50\x20\x49\x44\x3A "
read logger
sleep 1
pprint "\n\x50\x59\x52\x4F\x47\x52\x41\x4D\x20\x53\x54\x52\x49\x4E\x47\x20\x53\x45\x53\x53\x49\x4F\x4E\x20\x4F\x46\x20\x41\x53\x53\x49\x53\x54\x41\x4E\x54\x20\x41\x43\x43\x4F\x55\x4E\x54\x3A "
read string_session
sleep 1
pprint "\n\x4D\x55\x53\x49\x43\x20\x42\x4F\x54\x20\x4E\x41\x4D\x45\x3A "
read mbt
pprint "\n\x4F\x77\x6E\x65\x72\x20\x49\x64\x20\x3A"
read ownid
pprint "$cgreen \n\n\x50\x72\x6F\x63\x65\x73\x73\x69\x6E\x67\x20\x79\x6F\x75\x72\x20\x76\x61\x72\x73\x2C\x20\x57\x61\x69\x74\x20\x61\x20\x77\x68\x69\x6C\x65\x21"
sleep 5
if [-f .env]; then
sudo rm .env
fi
echo """API_ID = $api_id
API_HASH = $api_hash
BOT_TOKEN = $bot_token
MONGO_DB_URI = $mongo_db
LOG_GROUP_ID = $logger
MUSIC_BOT_NAME = $mbt
STRING_SESSION = $string_session
OWNER_ID = $ownid""" > .env
clear
pprint "\n\n\n\x59\x6F\x75\x72\x20\x56\x61\x72\x73\x20\x68\x61\x76\x65\x20\x62\x65\x65\x6E\x20\x73\x61\x76\x65\x64\x20\x53\x75\x63\x63\x65\x73\x73\x66\x75\x6C\x6C\x79\x21\x2C\x20\x54\x68\x61\x6E\x6B\x73\x20\x66\x6F\x72\x20\x75\x73\x69\x6E\x67\x20\x59\x75\x6B\x6B\x69\x20\x49\x6E\x73\x74\x61\x6C\x6C\x65\x72\x2C\x20\x6E\x6F\x77\x20\x79\x6F\x75\x20\x63\x61\x6E\x20\x70\x72\x6F\x63\x65\x65\x64\x20\x62\x79\x20\x73\x74\x61\x72\x74\x69\x6E\x67\x20\x74\x68\x65\x20\x62\x6F\x74\x20\x77\x69\x74\x68\x20\x62\x61\x73\x68\x20\x73\x74\x61\x72\x74\x21"
pprint "\n\n\n\x57\x61\x6E\x74\x20\x6D\x6F\x72\x65\x20\x76\x61\x72\x73\x3F"
pprint "\n\x43\x68\x65\x63\x6B\x6F\x75\x74\x20\x63\x6F\x6E\x66\x69\x67\x2E\x70\x79\x20\x61\x6E\x64\x20\x72\x65\x61\x64\x6D\x65\x2E\x6D\x64\x20\x69\x6E\x73\x69\x64\x65\x20\x63\x6F\x6E\x66\x69\x67\x20\x66\x6F\x6C\x64\x65\x72\x20\x66\x6F\x72\x20\x61\x64\x64\x74\x69\x6F\x6E\x61\x6C\x20\x76\x61\x72\x73\x2E\x20\x59\x6F\x75\x20\x63\x61\x6E\x20\x63\x68\x61\x6E\x67\x65\x20\x61\x6C\x6C\x20\x69\x6D\x61\x67\x65\x73\x20\x2C\x20\x54\x68\x75\x6D\x62\x73\x2C\x20\x6D\x6F\x64\x65\x20\x61\x6E\x64\x20\x65\x76\x65\x72\x79\x74\x68\x69\x6E\x67\x20\x66\x72\x6F\x6D\x20\x76\x61\x72\x73\x2E\x20\x48\x61\x76\x65\x20\x61\x20\x6C\x6F\x6F\x6B\x20\x74\x6F\x77\x61\x72\x64\x73\x20\x74\x68\x65\x6D\n\n"