LoadingReadyLive chatbot
Licensed under Apache-2.0 (LICENSE or https://www.apache.org/licenses/LICENSE-2.0).
LRRbot contains modules that aren't licensed under Apache-2.0:
lrrbot/commands/quote.py
is licensed under the MIT license.
Things not covered: keys.json
for !highlight
, tokens and secrets for Patreon integration, Slack integration.
-
These commands assume Ubuntu 16.10 and that you're using Bash as your shell. Adapt as needed.
sudo apt-get install git postgresql-9.5 postgresql-server-dev-9.5 python3.5-dev virtualenv build-essential git clone git@github.com:mrphlip/lrrbot cd lrrbot virtualenv -p python3.5 venv . venv/bin/activate pip install -r requirements.txt sudo -u postgres psql -c "CREATE USER \"$USER\";" sudo -u postgres psql -c "CREATE DATABASE lrrbot;" sudo -u postgres psql -c "GRANT ALL ON DATABASE lrrbot TO \"$USER\";"
-
Write a
lrrbot.conf
file. Basic template:[lrrbot] username: password: oauth channel: preferred_url_scheme: http session_secret: google_key: twitch_clientid: twitch_clientsecret: [apipass] [alembic] script_location = alembic
Values to fill in:
username
: The Twitch username of the bot. You can use your personal account, you don't need to create a new one for the bot.channel
: The channel the bot will join. Can be the same asusername
.session_secret
: A random string. You can generate one with the commandhead -c 18 /dev/urandom | base64
google_key
: API key to Google's services. Create a project on Google Developer Console, enable Google Calendar API, and generate an API key under Credentials.twitch_clientid
andtwitch_clientsecret
: In your Twitch settings, under Connections register a new application. Set the redirect URI tohttp://localhost:5000/login
.
-
Write a
data.json
file. Basic template:{ "responses": {} }
-
Populate the database:
alembic -c lrrbot.conf upgrade head
-
Start LRRbot components:
- IRC bot:
python start_bot.py
- Webserver:
python webserver.py
- (optional) Server-sent events server:
python eventserver.py
- Go to
http://localhost:5000/login
and log in with the bot account (name inusername
config key) and the channel account (name inchannel
config key). - Restart the bot.