# Discord Chat Relay A bidirectional chat relay mod for TERA Proxy. - **Game → Discord:** Forwards in-game chat to Discord via webhooks. - **Discord → Game:** Relays Discord messages into the game using a bot. ## Requirements - [TERA Proxy](https://github.com/justkeepquiet/tera-proxy-server) or compatible fork - A Discord **Webhook URL** for each chat channel (game → Discord) - A Discord **Bot Token** with `Send Messages` and `Read Message History` permissions (Discord → game) ## Installation Place the `discord-chat-relay` folder inside your Proxy's `mods/` directory: ``` mods/ └── discord-chat-relay/ ├── index.js ├── manifest.json ├── module.config.json ├── module.json └── README.md ``` Restart your Proxy or reload the mod. ## Configuration Edit `module.config.json`: ```json { "enabled": true, "webhooks": { "general": "https://discord.com/api/webhooks/...", "trade": "https://discord.com/api/webhooks/..." }, "botToken": "your-discord-bot-token", "discordChannels": { "discord-channel-id": 27 }, "pollInterval": 3000, "logLevel": "info" } ``` | Field | Description | |---|---| | `enabled` | Set to `false` to disable the mod. | | `webhooks` | Webhook URLs for forwarding in-game chat to Discord. | | `botToken` | Discord bot token (required for Discord → game). | | `discordChannels` | Maps Discord channel IDs to in-game channels (`27` = General, `4` = Trade). | | `pollInterval` | Polling interval in ms (default: `3000`). | | `logLevel` | Log verbosity: `"info"` (minimal), `"warn"` (default, shows routing), `"debug"` (everything). | ## Logs Check the Proxy console for lines prefixed with `[Discord Chat Relay]` to monitor activity and troubleshoot. ## License MIT