···11# Slack Configuration
22SLACK_BOT_TOKEN=xoxb-your-bot-token-here
33SLACK_SIGNING_SECRET=your-signing-secret-here
44-SLACK_CHANNEL=C1234567890
5465# IRC Configuration
76IRC_NICK=slackbridge
88-IRC_CHANNEL=#general
97108# Admin users (comma-separated Slack user IDs)
119ADMINS=U1234567890
12101311# Server Configuration (optional)
1412PORT=3000
1313+1414+# Note: Channel and user mappings are now stored in the SQLite database (bridge.db)
1515+# Use the API or database tools to manage mappings
···3030# Slack Configuration
3131SLACK_BOT_TOKEN=xoxb-your-bot-token-here
3232SLACK_SIGNING_SECRET=your-signing-secret-here
3333-SLACK_CHANNEL=C1234567890 # Optional: for bidirectional bridging
34333534# IRC Configuration
3635IRC_NICK=slackbridge
3737-IRC_CHANNEL=#general
38363937# Admin users (comma-separated Slack user IDs)
4038ADMINS=U1234567890
···45434644See `.env.example` for a template.
47454646+### Managing Channel and User Mappings
4747+4848+Channel and user mappings are stored in a SQLite database (`bridge.db`). You can manage them through:
4949+5050+**Using Bun REPL:**
5151+```bash
5252+bun repl
5353+> import { channelMappings, userMappings } from "./src/db"
5454+> channelMappings.create("C1234567890", "#general")
5555+> userMappings.create("U1234567890", "myircnick")
5656+> channelMappings.getAll()
5757+```
5858+5959+**Using SQLite directly:**
6060+```bash
6161+bun:sqlite bridge.db
6262+sqlite> SELECT * FROM channel_mappings;
6363+sqlite> INSERT INTO channel_mappings (slack_channel_id, irc_channel) VALUES ('C1234567890', '#general');
6464+```
6565+4866### How it works
49675050-The bridge connects to `irc.hackclub.com:6667` (no TLS) and forwards messages bidirectionally:
6868+The bridge connects to `irc.hackclub.com:6667` (no TLS) and forwards messages bidirectionally based on channel mappings:
51695252-- **IRC → Slack**: Messages from IRC appear in the configured Slack channel
5353-- **Slack → IRC**: Messages from Slack are sent to the IRC channel (if SLACK_CHANNEL is configured)
7070+- **IRC → Slack**: Messages from mapped IRC channels appear in their corresponding Slack channels
7171+- **Slack → IRC**: Messages from mapped Slack channels are sent to their corresponding IRC channels
7272+- User mappings allow custom IRC nicknames for specific Slack users
54735574The bridge ignores its own messages and bot messages to prevent loops.
5675