Skip to content

Commit c6a153a

Browse files
committed
Added readme
1 parent 57c7cbb commit c6a153a

File tree

2 files changed

+36
-1
lines changed

2 files changed

+36
-1
lines changed

README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Discord Playback Enqueuer
2+
## Introduction
3+
This project is still in concept phase, therefore it only provides the most basic of functionality, maybe even less. Most importantly, it has not been tested for security issues, so this bot must not be used larger context than a small circle of friends.
4+
## Prerequisites
5+
To run this bot, you need to have docker and docker-compose installed. The bot is tested on docker version 19.03.13 and docker-compose version 1.27.4.
6+
## Setup
7+
To start the bot, clone the repository and add the following files in the repository root and fill in the information:
8+
The file format is ``key=value`` with one key-value pair per line.
9+
### Required Files
10+
#### bot-environment.env
11+
Attribute | Value
12+
--------------- | ---------
13+
SPOTIFY_ID | The spotify client ID of your application
14+
SPOTIFY_SECRET | The spotify secret of your application
15+
DISCORD_TOKEN | The discord bot token of your discord bot
16+
REDIRECT_URI | The redirect URI that spotify will use for the OAuth2.0 authorization. This URI must lead to the registration docker container and has to be registered in the spotify settings as redirect URI
17+
(optional) LOGLEVEL | The level of information displayed in the console. Can either be error, warn, info (default), verbose, debug or silly.
18+
19+
#### mariadb-environment.env
20+
Attribute | Value
21+
--------------- | ---------
22+
MYSQL_ROOT_PASSWORD | The root password for you mariadb instance. Can be used fairly randomly, as it will not be used and the database should not be accessible from outside the network.
23+
MYSQL_DATABASE | The name for the database used.
24+
MYSQL_USER | The username of the user the bot uses to access the database defined in MYSQL_DATABASE.
25+
MYSQL_PASSWORD |The username of the user the bot uses to access the database defined in MYSQL_DATABASE.
26+
27+
### Starting the Bot
28+
To start the bot, execute ```docker-compose up --build``` in the root directory of the repository. This should start all the containers. If nothing goes wrong, the bot will be online and taking requests.
29+
30+
## Available commands
31+
Command | Parameters | Description
32+
--------------- | ---------- | ------------
33+
$registerMe | *none* | Sends a registration link to the user typing the command. If clicked on, the user tokens will be added to the database.
34+
$createParty | @user | Creates a listening party that controlls the spotify queue of the command issuer.
35+
Songlink | *none* | If sent in a party channel, the song will be added to the playback queue of the channel owner. It doesn't matter, if there is other text in the message, as long as the link is clickable. This allows you to use the Spotify share option on mobile.

bot/src/model/data/repositoryImpl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export class RepositoryImpl implements Repository {
2020
user: process.env.MYSQL_USER,
2121
password: process.env.MYSQL_PASSWORD,
2222
connectionLimit: 5,
23-
database: "playback_enq",
23+
database: process.env.MYSQL_DATABASE,
2424
bigNumberStrings : true
2525
})
2626
return this.pool;

0 commit comments

Comments
 (0)