Development¶
Setup guide for developers who wish to contribute. Selfhosting .fmbot is not supported.
Installing the database¶
- Download PostgreSQL 16 and start the installation.
- Make sure pgadmin is checked in the installation wizard.
- If you enter a custom password, make sure to also add it to the
config.json
file 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'.
Viewing the data
To view the data in the database, use pgadmin and click the fmbot database > schemas > public > tables.
Development¶
- It's recommended to either use Visual Studio or Rider as your IDE
- The first time you debug the bot it will automatically create a
config.json
that's located in thebin
folder. You will have to enter your own configuration values there. - Need more help? Contact
frikandel
on Discord, or see our server
Internal API¶
The bot requires an internal API for some cache-heavy tasks.
This API is not publicly available, you should however be able to run and debug the bot without it for local development.
Getting API keys¶
Discord¶
- Go to the Discord Developers Portal
- Create a bot and enter your token into the config file.
Last.fm¶
- Create an API account
- Enter the key and secret into the config file.
Genius¶
- Go to your API Clients
- Create one and enter the 'client access token' into the config file.
Spotify¶
- Go to the Spotify Developer dashboard
- Create an app and enter both the ID and the secret into the config file.