Skip to content

Commit

Permalink
Add basic seabird-discord-backend docs
Browse files Browse the repository at this point in the history
  • Loading branch information
belak committed Apr 7, 2024
1 parent c234437 commit 63736a0
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
- [seabird-core](admin/seabird-core.md)
- [seabird-proxy-plugin](admin/seabird-proxy-plugin.md)
- [Chat Backends]()
- [seabird-discord-backend]()
- [seabird-discord-backend](admin/seabird-discord-backend.md)
- [seabird-irc-backend]()
- [seabird-minecraft-backend]()
- [Plugins]()
Expand Down
7 changes: 7 additions & 0 deletions src/admin/_common_settings.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Common settings:

- `SEABIRD_ID` (optional, defaults to `seabird`) - (TODO: determine what this is
and why it's not supported everywhere)
- `SEABIRD_HOST` (required) - this is the URL of the `seabird-core` instance.
Most users should use `https://core.seabird.chat`
- `SEABIRD_TOKEN` (required) - the seabird token
34 changes: 34 additions & 0 deletions src/admin/seabird-discord-backend.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# seabird-discord-backend

[![Static Badge](https://img.shields.io/badge/repository-blue?logo=git&label=%20&labelColor=grey&color=blue)](https://github.com/seabird-chat/seabird-discord-backend)
[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/seabird-chat/seabird-core/docker-publish.yml)](https://github.com/seabird-chat/seabird-discord-backend/actions/workflows/docker-publish.yml)

## Dependencies

- `seabird-core`

## Configuration

### Environment Variables

{{#include _common_settings.md}}

Discord-specific settings

- `DISCORD_TOKEN` (required) - Both an
[application](https://discord.com/developers/docs/quick-start/getting-started)
and a [bot user](https://discord.com/developers/docs/topics/oauth2#bot-users)
must be set up in Discord, and connected to the relevant Discord server by an
admin on that server. The correct OAuth URL has been lost to time, but make
sure priviledged intents (presence, server members, and message content) are
enabled. Note that tokens must be prefixed with `Bot ` in order for Discord to
use them as a bot token.
- `DISCORD_COMMAND_PREFIX` (optional, defaults to `!`)
- `DISCORD_CHANNEL_MAP` (optional, defaults to empty) - a comma separated list
of Discord voice channels, followed by a `:` and then a channel which should
be notified when someone joins.

## Known Issues

- There is not true Discord "command" support, so all commands need to be
prefixed by the `DISCORD_COMMAND_PREFIX` setting.
6 changes: 5 additions & 1 deletion src/admin/seabird-proxy-plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,14 @@

### Environment Variables

{{#include _common_settings.md}}

Proxy-specific settings

- `PROXY_CONFIG_FILE` (required) - path to the config file for the plugin
- `RUST_LOG` (optional, defaults to `info,seabird-proxy-plugin=debug`) - this is
a common rust environment variable documented here because we set a default.
All seabird functionality is exposed under `seabird`.
All seabird functionality is exposed under the `seabird` logger.

### Config File

Expand Down

0 comments on commit 63736a0

Please sign in to comment.