-
Notifications
You must be signed in to change notification settings - Fork 0
/
megareborn.sh
77 lines (69 loc) · 2.1 KB
/
megareborn.sh
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
#!/usr/bin/env bash
cd $HOME/megareborn
install() {
cd tg
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt-get install g++-4.7 -y c++-4.7 -y
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install libreadline-dev -y libconfig-dev -y libssl-dev -y lua5.2 -y liblua5.2-dev -y lua-socket -y lua-sec -y lua-expat -y libevent-dev -y make unzip git redis-server autoconf g++ -y libjansson-dev -y libpython-dev -y expat libexpat1-dev -y
sudo apt-get install screen -y
sudo apt-get install tmux -y
sudo apt-get install libstdc++6 -y
sudo apt-get install lua-lgi -y
sudo apt-get install libnotify-dev -y
sudo service redis-server restart
wget https://valtman.name/files/telegram-cli-1222
mv telegram-cli-1222 tgcli
chmod +x tgcli
cd ..
chmod +x bot
chmod +x tg
}
function print_logo() {
echo -e "\033[38;5;600m"
echo -e " R"
echo -e " B"
echo -e " R"
echo -e " N"
echo -e "\n\e[36m"
}
function logo_play() {
declare -A txtlogo
seconds="0.010"
txtlogo[1]="REBORN"
txtlogo[2]="MEGA"
txtlogo[3]=""
txtlogo[4]=""
printf "\033[38;5;600m\t"
for i in ${!txtlogo[@]}; do
for x in `seq 0 ${#txtlogo[$i]}`; do
printf "${txtlogo[$i]:$x:1}"
sleep $seconds
done
printf "\n\t"
done
printf "\n"
}
if [ "$1" = "install" ]; then
install
else
if [ ! -f ./tg/tgcli ]; then
echo "tg not found"
echo "Run $0 install"
exit 1
fi
print_logo
echo -e "\033[38;5;208m"
echo -e " >>>> MEGA "
echo -e " >>>> BOT "
echo -e " >>>> ANTISPAM "
echo -e " >>>> @BOTREBORN_CH :-) "
echo -e " >>>> "
echo -e "\033[0;00m"
echo -e "\e[36m"
logo_play
#sudo service redis-server restart
#./tg/tgcli -s ./bot/bot.lua -l 1 -E $@
./tg/tgcli -s ./bot/bot.lua $@
fi