You can run my bot locally or, for example, in an AWS EC2 instance, by doing either of:
-
Using my bash install script
run.sh
-
Download the script
curl -L https://raw.githubusercontent.com/nigeltroy/discord-bot/master/run.sh -o run.sh
-
Give the script executable permissions
chmod +x run.sh
-
Run the script, giving the name of the bot as the argument name. For eg.:
./run.sh mega-simp-bot
-
-
Clone the repo and run
main.py
(make sure that Python 3 and pip are installed)-
Clone the repository
git clone https://github.com/nigeltroy/discord-bot.git
-
Navigate to the project directory
cd discord-bot
-
Copy
stub.env
to.env
cp stub.env .env
-
Fill out
.env
file with the environment variables (replacevim
with the text editor of your choice)vim .env
-
Install Python requirements for the project
pip3 install -r requirements.txt
-
Run the bot and write the process ID to
.bot-pid
sudo python3 main.py & echo $! > .bot-pid
-