2022-05-05 09:16:40 +00:00
|
|
|
# SoundFX
|
2020-05-20 00:23:14 +00:00
|
|
|
|
2022-05-05 09:16:40 +00:00
|
|
|
A bot for managing sound effects in Discord.
|
2020-05-20 00:23:14 +00:00
|
|
|
|
|
|
|
### Building
|
|
|
|
|
2022-05-05 09:16:40 +00:00
|
|
|
`sudo apt install gcc gcc-multilib cmake`
|
|
|
|
|
2022-05-05 09:17:54 +00:00
|
|
|
Run the migrations in the `migrations` directory to set up the database.
|
|
|
|
|
2022-05-05 09:16:40 +00:00
|
|
|
Use the Cargo.toml file to build it. Needs Rust 1.52+
|
2020-05-20 00:23:14 +00:00
|
|
|
|
|
|
|
### Running & Config
|
|
|
|
|
|
|
|
The bot connects to the MySQL server URL defined in a `.env` file in the working directory of the program.
|
|
|
|
|
|
|
|
Config options:
|
|
|
|
* `DISCORD_TOKEN`- your token (required)
|
|
|
|
* `DATABASE_URL`- your database URL (required)
|
|
|
|
* `MAX_SOUNDS`- specifies how many sounds a user should be allowed without Patreon
|
|
|
|
* `PATREON_GUILD`- specifies the ID of the guild being used for Patreon benefits
|
|
|
|
* `PATREON_ROLE`- specifies the role being checked for Patreon benefits
|
|
|
|
* `CACHING_LOCATION`- specifies the location in which to cache the audio files (defaults to `/tmp/`)
|
2022-05-05 09:19:19 +00:00
|
|
|
* `UPLOAD_MAX_SIZE`- specifies the maximum upload size to permit in bytes. Defaults to 2MB
|