2024-09-03 22:33:29 -04:00
2024-03-03 16:17:56 -05:00
2024-09-05 11:52:14 -04:00
2024-09-05 11:52:14 -04:00
2024-09-03 22:33:29 -04:00
2024-05-04 14:00:54 -04:00
2024-09-05 11:01:08 -04:00
2024-09-05 11:52:14 -04:00
2024-01-30 20:09:51 -05:00
2023-07-05 22:42:25 -04:00
2024-09-03 22:33:29 -04:00
2023-07-05 22:44:54 -04:00

drawing

Siren

Siren is a D&D Bot built for Discord, written in Rust. Features include:

  • Play tracks from Youtube or locally hosted files
  • Assistant DM tools to be defined later
  • ChatGPT integration

Requirements

Running

  1. Setup the Discord Developer Application and bot
  2. Create .env.local and override any variables from .env
    • At minimum, DISCORD_TOKEN must be set. See instructions for additional steps.
  3. Build the Docker application with make build
  4. Start the application with make up

Setting up the Discord Developer Application

Visit the [Discord Developer Portal](https://discord.com/developers/applications) and create a new application. Click [here](https://discord.com/developers/docs/intro) for guides and more information.

Required Scopes:

bot
application.commands

Example Invite:

https://discord.com/api/oauth2/authorize?client_id=<CLIENT_ID>&permissions=40671259392832&scope=bot%20applications.commands

The CLIENT_ID can be found in the General Information tab on the Discord Developer Portal for your application, under Application ID

The DISCORD_TOKEN (used in the .env file) can be found under the Bot tab on the Discord Developer Portal for your application.

DISCORD_TOKEN Example

Commands

Siren utilizes Discord slash commands. To view the commands, run /help in a server where the bot is installed. The following commands are available:

Command Description
/play Play a track from Youtube or locally hosted files
/pause Pause the current track
/resume Resume the current track
/skip Skip the current track
/stop Stop the current track
/queue TODO - Display the current queue
/clear TODO - Clear the current queue
/shuffle TODO - Shuffle the current queue
/loop TODO - Loop the current track
/nowplaying TODO - Display the current track
/volume Set the volume of the bot
/ping Display the bot's latency
/roll Roll a dice
/help TODO - Display a list of commands

Contributing

Rust must be installed to run locally. See serenity-rs/serenity for more information about Rust Discord API Library.

The following packages must be installed for serenity-rs/songbird. View the repository for additional installation and setup information on other operating systems.

Unix Installation Notes:
  • yt-dlp is preferred over youtube-dl.
sudo apt install libopus-dev
sudo apt install ffmpeg
sudo apt apt install youtube-dl # See notes above
# PostgreSQL Headers
sudo apt install libpq5
sudo apt install libpq-dev
Mac Installation Notes:
brew install opus
brew install ffmpeg
brew install yt-dlp # See notes above
brew install postgresql

Running Locally

  1. Start the backend containers with make docker-refresh
  2. Start the application with make run

The application can also be tested from within a Docker container:

docker build -t siren:latest .
docker run --env-file .env -it --rm --name siren siren:latest
Description
No description provided
Readme 2.9 MiB
Languages
Rust 48.4%
TypeScript 40.8%
CSS 10%
Dockerfile 0.5%
JavaScript 0.2%