Beeerbot: now in Discord
- Make sure to get Python 3.5 or higher
This is required to actually run the bot.
- Install necessary packages [*Nix]
You will need git
, python3-dev
and libenchant1c2a
, libxml2-dev
, libxslt-dev
and zlib1g-dev
. Install these with your system's package manager.
For example, on a Debian-based system, you could use:
[sudo] apt-get install -y python3-dev git libenchant-dev libxml2-dev libxslt-dev zlib1g-dev
You will also need to install pip
, which can be done by following this guide
- Set up venv
$ python3 -m venv ~/path/to/venv/beeerbot/
$ source ~/path/to/venv/beeerbot/bin/activate
- Install dependencies
pip install -U -r requirements.txt
- Setup configuration
Copy the config.default.yml
file in the root directory and rename to config.yml
.
The only required field is discord.token
. Everything else depends on which cogs
you have loaded.
- Configuration of database
To configure the SQLite database for use by the bot, go to the directory where launcher.py
is located, and run the script by doing python3 launcher.py db init
.
- PM2 configuration (required for bot restart ability)
- Ensure you have Node and npm installed (instructions here)
- Ensure you have npm installed (instructions here)
- Copy the
ecosystem.config.default.js
file in the root directory and rename toecosystem.config.js
- Update the
interpreter
field with the correct absolute path to the Python binary in the virtualenv - Start the bot with
pm2 start ecosystem.config.js
(this replaces the running instructions below)
Launch with python launcher.py