System dependencies are built into the Vagrant file, with ansible scripts in /sys/
.
vagrant up local
will bootstrap a local VM with the app (and python virtualenv) installed in /opt/j4ne
As the user your bot should run as:
virtualenv -p python3.5 env
env/bin/pip install -r requirements.txt
J4ne needs a bunch of credentials, which are stored in the keys.py
files. Sorry, it will probably crash if you don't have a full set.
You can turn some networks off by passing --< network >=False
, eg, --twitter=False
to not load twitter.
This is awkward and bad UX, sorry.
You can create a Discord application here: Discord Applications
# proj-dir/keys.py
discord_token = 'your-secret-token'
discord_app_id = 'your-discord-client/application-ID'
Afterwards use the --newbot
option to generate an invitation link to your server:
./env/bin/python j4ne.py --newbot
The following options should be passed to j4ne.py
if you are running the bot for the first time.
newbot
: This option will generate a link at the command line so you can add j4ne to your Discord server
mktables
: Generates a new sqlite database
Migrations can be run by name, see db.py
for notes