rhwang10 / elsa

HTV Discord's bot

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Elsa

Elsa is HTV's Discord bot. It talks to iduna, which is an API that exposes a ranking service for messages, that are created through marshmallow-ui, a Streamlit app. When a user messages a Discord server that Elsa has been added to, a request is made to iduna to get the highest ranked message for a user. iduna ranks messages based on the least recently sent message, and rate limits messages as well. If an eligible message exists, iduna will send it back to Elsa, and Elsa will relay it back to Discord.

plot

Setup

Before running:

  1. Set up iduna API to run locally
  2. Set up a local postgres and initialize it with the sql script found in iduna repository
  3. Set up a local Redis server
  4. [Optional] Set up marshmallow-ui frontend app

Just run the script setup.sh to initialize env variables once the setup is complete

$ source ./setup.sh

Buildpacks (If deploying on Heroku)

Elsa requires the ffmpeg and heroku-opus buildpacks to run on Heroku.

heroku buildpacks:add https://github.com/xrisk/heroku-opus.git
heroku buildpacks:add https://github.com/jonathanong/heroku-buildpack-ffmpeg-latest.git

About

HTV Discord's bot

License:MIT License


Languages

Language:Python 97.7%Language:Shell 1.5%Language:Dockerfile 0.7%Language:Procfile 0.1%