Skip to content

Commit

Permalink
Merge pull request #121 from jontze/docs/add-required-permissions-to-…
Browse files Browse the repository at this point in the history
…readme

docs(README): Add required permissions and scopes to use cadency
  • Loading branch information
jontze committed Jul 29, 2023
2 parents 3d983cf + 00f8f15 commit a12c17b
Showing 1 changed file with 22 additions and 13 deletions.
35 changes: 22 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,38 @@ Initially this was intended to be a rust clone of [my typescript discord bot](ht

> WARNING: Cadency is not production ready! It might eat your laundry.
## Features

- **Play songs** from Youtube using a url or a search phrase
- Add complete Youtube **playlists** to the song queue
- **Maintain a queue** of songs which you can pause, skip and resume.
- Look for a phrase or word in the **Urban Dictionary**
- Let **Cadency-rs** say something **inspiring**
- Slap someone with a **trout**
- Calculate a number in the **fibonacci** sequence
- And play a classic game of **ping pong**

## Installation

The recommended way to install and run **Cadency-rs** is with Docker, as the Docker image installs several libraries and binaries that are required to use or build the bot.
The recommended way to install and run **Cadency-rs** is with Docker, as the Docker image installs several libraries and executables that are required to use the bot.

1. Pull the image from the **ghcr.io** registry (`main` pulls the latest stable build, `develop` latest development build, `vX.X.X` pulls a fixed version)

```sh
docker pull ghcr.io/jontze/cadency_rs:main
```

2. Start a container and pass your discord bot token to the container by setting the `DISCORD_TOKEN` environment variable and optional specify the log level e.g. `RUST_LOG="cadency=info"`.
2. Start a container and pass your discord bot token to the container by setting the `DISCORD_TOKEN` environment variable and optional specify the log level e.g. `RUST_LOG="cadency=debug"`.
3. Invite the bot to your discord server, discord offers great [documentation](https://discord.com/developers/docs/getting-started) on how to do this.

## Permissions

Cadency requires the `bot` **scope** and several permissions on a server to work properly Therefore, ensure to set these in the developer portal during the creation of the invite link:

- `Send Messages`
- `Connect`
- `Speak`

## Example docker setup

Replace the TOKEN_HERE with your token:
Expand All @@ -33,21 +52,11 @@ To stop the container, execute the following command and substitute ID for the i
docker stop ID
```

## Features

- **Play songs** from Youtube using a url or a search phrase
- Add complete Youtube **playlists** to the song queue
- **Maintain a queue** of songs which you can pause, skip and resume.
- Look for a phrase or word in the **Urban Dictionary**
- Let **Cadency-rs** say something **inspiring**
- Slap someone with a **trout**
- Calculate a number in the **fibonacci** sequence
- And play a classic game of **ping pong**

## Environment Variables

| Variable Name | Default Value | Description |
| ----------------------------- | -------------- | --------------------------------------------------------- |
| `DISCORD_TOKEN` | | Discord bot token |
| `RUST_LOG` | `cadency=info` | Log Level |
| `CADENCY_PLAYLIST_SONG_LIMIT` | `30` | Maximum amount of songs that can be added from a playlist |
| `CADENCY_SONG_LENGTH_LIMIT` | `600.00` | Maximum allowed song length in seconds |
Expand Down

0 comments on commit a12c17b

Please sign in to comment.