Optykan / Tzuyu

A discord bot built on discord.js that supports playing music, permission management (ish), and rendering LaTeX. It also has support for user-developed plugins, if you wanted to do such a thing
2 stars 2 forks source link

CircleCI

Meet Tzuyu

Features:

Setup

If you're using Heroku, follow all the steps except for the ones marked (Local). If you're running this locally, follow all the steps except the ones marked (Heroku).

  1. Create a .env file, and add keys for BOT_TOKEN (the token that discord developer page gives you) and YT_API_KEY (from the google developer console). We require postgres for handling permissions (this should be changed later) but for now see: https://www.postgresql.org/docs/9.3/static/libpq-envars.html, and add keys/value pairs for PGHOST, PGUSER, PGDATABASE, PGPASSWORD, PGSSLMODE (hint, the value is require), and PGPORT. Finally, add BOT_PREFIX to change what the prefix for commands should be (default is %) Optionally, add a BOT_CHANNEL which holds the id of the default text channel the bot should message in. Syntax: KEY_NAME=KEY_VALUE.

  2. (Heroku) Navigate to Settings > Config Variables and copy the key/value pairs from step 1.

  3. (Heroku) Deploy this repo to your local heroku instance and navigate to Settings>Buildpacks and add: https://github.com/jonathanong/heroku-buildpack-ffmpeg-latest.git

  4. (Local) Run npm install then npm start. Make sure you have ffmpeg installed and avaliable in your PATH (if windows)

  5. (Heroku) Navigate to Resources > Dynos and make sure the bot worker is enabled.

  6. Add the bot to your server

  7. Try $help and see if its alive.

Notes: Make sure the bot is actually a bot (see https://discordapp.com/developers/applications/me)

Windows Dependencies

Follow this thingy and just listen to it: https://github.com/Automattic/node-canvas/wiki/Installation---Windows

Run npm install --global --production windows-build-tools after all that