From 5b5679e92f2541a69210c20c4450e07d7fbb1337 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Thu, 21 May 2020 18:00:16 -0400 Subject: Revamped the bash file --- run_bash.sh | 43 +++++++++++++++++++++++++++++++++++++++++++ run_linux.sh | 6 ------ run_win.bat | 9 +++++++-- 3 files changed, 50 insertions(+), 8 deletions(-) create mode 100644 run_bash.sh delete mode 100644 run_linux.sh diff --git a/run_bash.sh b/run_bash.sh new file mode 100644 index 0000000..a7ca506 --- /dev/null +++ b/run_bash.sh @@ -0,0 +1,43 @@ +#!/bin/bash +echo 'Welcome to the AleeBot Console.' +echo 'If you want to self-host this bot, please continue by executing the following steps:' +echo '1. Create a tokens.json file and include the token of your bot user so that the bot does not error out when connecting to Discord Servers.' +echo '2. You will need to edit this file that you ran, and remove the "git pull" line. This causes errors as it will try to pull from the AleeBot git.' +echo '3. Finally, you must credit the developers (Alee Productions Developers will work fine).' +echo '--------------------------------------------------------------------------------' +echo "To start the bot when you are ready, type in 'Yes/yes/y' or type in 'debug' to enter debug mode or type in 'beta' to enter beta mode." +while true +do +read -r -p "> " input + +case $input in + [yY] | [yY][eE][sS]) + for (( ; ; )) + do + git pull + node bot_discord.js + sleep 2 + done + ;; + [dD][eE][bB][uU][gG]) + for (( ; ; )) + do + node bot_discord.js --debug + sleep 2 + done + ;; + [bB][eE][tT][aA]) + for (( ; ; )) + do + node bot_discord.js --beta + sleep 2 + done + ;; + [nN] | [nN][oO]) + exit 1 + ;; + *) +echo "Invalid input..." + ;; +esac + done \ No newline at end of file diff --git a/run_linux.sh b/run_linux.sh deleted file mode 100644 index 4fe9b97..0000000 --- a/run_linux.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -for (( ; ; )) -do - git pull - node bot_discord.js -done \ No newline at end of file diff --git a/run_win.bat b/run_win.bat index b01fe26..4fd4f85 100644 --- a/run_win.bat +++ b/run_win.bat @@ -4,15 +4,16 @@ title AleeBot Console echo Welcome to the AleeBot Console. echo If you want to self-host this bot, please continue by executing the following steps: echo 1. Create a tokens.json file and include the token of your bot user so that the bot does not error out when connecting to Discord Servers. -echo 2. You will need to edit this file that you ran, and remove the 'git pull" line. This causes errors as it will try to pull from the AleeBot git. +echo 2. You will need to edit this file that you ran, and remove the "git pull" line. This causes errors as it will try to pull from the AleeBot git. echo 3. Finally, you must credit the developers (Alee Productions Developers will work fine). echo -------------------------------------------------------------------------------- -echo To start the bot when you are ready, type in 'Yes/yes/y' or type in 'debug' to enter debug mode. +echo To start the bot when you are ready, type in 'Yes/yes/y' or type in 'debug' to enter debug mode or type in 'beta' to enter beta mode. set /p start=user@AleeBot:~$ if %start% == Yes goto a if %start% == yes goto a if %start% == y goto a if %start% == debug goto ad +if %start% == beta goto ab if %start% == no goto cexit if %start% == No goto cexit if %start% == exit goto cexit @@ -33,6 +34,10 @@ echo. git pull node bot_discord.js --debug goto ad +:ab +git pull +node bot_discord.js --beta +goto ab :easter echo Hey... there is no easter egg... cls -- cgit v1.2.3