A Discord bot
- Docker along with
docker-compose
- Python 3.6+
ffmpeg
Make sure you have dependencies above installed in your system.
Rest of the steps can be summarized as:
$ git clone https://github.com/PacketFire/apophis
$ cd apophis
$ make setup
$ make pip-install
Initialize Docker containers which will install Postgres and Flyway DB
$ docker-compose up postgres
$ docker-compose run flyway-migrate
You need to get token for your Bot. This might be useful.
Steps thereafter look similar to this:
$ docker-compose up postgres
$ source venv/bin/activate
$ BOT_TOKEN=<your_bot_token> python apophis
NOTE: Above steps assume that you are inside apophis
's root directory (one that contains Makefile
and Dockerfile
)
If everything is alright, your bot should be running. You can invoke some commands like !define discord
to test it.
NOTE: If you are running the bot for the first time, please read instructions below.
When attempting to run commands like !music
, you will be greeted with "Unauthorized".
For other commands like downloading music
and adding other users to access list, you need to add yourself (your Discord ID to be precise) to list of authorized users.
To do so you will need your Discord ID which can be found by following these steps.
Once that is out of the way, you need to connect to Postgres container, and add your Discord ID to permissions
table. These steps can be summarized (and visualized as)
$ docker exec -it <your_containers_name> psql -U postgres
postgres=# \c apophis
postgres=# INSERT INTO permissions (username, level) VALUES (<your_discord_id>, 2);
You can find your container name under column named NAMES
after running docker ps
.
Aaaaannnd you are done!