Installing the database¶
- Download PostgreSQL 13 and start the installation.
- Make sure pgadmin is checked in the installation wizard.
- Use as password 'password'. This is safe because the database will not be accessed externally. You can set a different password in the config.json we create later.
- Set the port to port '5432' and continue with the installation. You can also change this port in the config if you want.
- After the installation is done, open pgadmin.
- Right-click on databases and create a database called 'fmbot'.
Running the bot¶
- Download the
BinaryRelease.zipfrom the latest release.
- Extract both BinaryRelease.zip and BinaryFiles.zip and put the files into the same folder.
- Make sure you have the .NET 5.0 SDK installed
- Run the bot once and a config file should be created in configs/configs.json. The database tables will also be created.
- Open this config and enter the values. Spotify and Genius api keys aren't required, but the commands will not work.
- Make sure the config is in a valid json format.
- Run the bot again.
If you want to update the bot in the future, just download the new "BinaryRelease.zip" and/or the new "BinaryFiles.zip" and override the old files with the new ones.
Viewing the data
To view the data in the database, click the fmbot database > schemas > public > tables.
Please also launch the bot from the "StartFMBot.bat" as it allows the bot to restart itself when there is an error.
Getting API keys¶
- Go to the Discord Developers Portal
- Create a bot and enter your token into the config file.
- Create an API account
- Enter the key and secret into the config file.
- Go to your API Clients
- Create one and enter the 'client access token' into the config file.
- Go to the Spotify Developer dashboard
- Create an app and enter both the ID and the secret into the config file.
Google (used for youtube):¶
- Create a project in the developer console
- Enable the Youtube Data API v3 for the project.
- In project credentials, create an API key
- Enter the API key in the config file.