Skip to content

Commit

Permalink
update development file
Browse files Browse the repository at this point in the history
  • Loading branch information
th0mk committed Mar 7, 2024
1 parent c6bee24 commit 2a25b4b
Showing 1 changed file with 8 additions and 23 deletions.
31 changes: 8 additions & 23 deletions docs/setup.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
# Development

!!! note "Selfhosting as a server owner"
If you're a server owner and are considering selfhosting keep in mind that we recommend [using the bot that we host](http://invite.fmbot.xyz/).
The reason for this is that selfhosting isn't officially supported.

We only recommend using this guide if you're a developer and know what you're doing.

Setup guide for developers who wish to contribute. Selfhosting .fmbot is not supported.

## Installing the database
1. Download PostgreSQL 16 and start the installation.
Expand All @@ -19,10 +14,16 @@
To view the data in the database, use pgadmin and click the fmbot database > schemas > public > tables.

## Development
- For development it's recommended to either use Visual Studio or Rider as your IDE
- 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 the `bin` folder. You will have to enter your own configuration values there.
- Need more help? Contact `frikandel` on Discord, or see [our server](https://discord.gg/fmbot)

## 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
Expand All @@ -44,19 +45,3 @@

1. Go to the [Spotify Developer dashboard](https://developer.spotify.com/dashboard/applications)
2. Create an app and enter both the ID and the secret into the config file.


## Running the bot (outdated)
1. Download the `BinaryFiles.zip` and the `BinaryRelease.zip` from the [latest release](https://github.com/fmbot-discord/fmbot/releases/latest).
2. Extract both BinaryRelease.zip and BinaryFiles.zip and put the files into the same folder.
3. Make sure you have the [.NET 8.0 SDK](https://dotnet.microsoft.com/en-us/download/dotnet/8.0) installed
4. Run the bot once and a config file should be created in configs/configs.json. The database tables will also be created.
5. Open this config and enter the values. Spotify and Genius api keys aren't required, but the commands will not work.
6. Make sure the config is in a valid json format.
7. Run the bot again.

!!! note "Updates"
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.

!!! note
Please also launch the bot from the "StartFMBot.bat" as it allows the bot to restart itself when there is an error.

0 comments on commit 2a25b4b

Please sign in to comment.