Originally created for the Kyiv Hackerspace community Discord server and friends around the net.
Discord bridge bot for linking channels (and threads) across servers while keeping strict role-based access control.
- Cross-server channel linking with named groups.
- Bridging for text channels, threads, and forum channels.
- Mirrored message lifecycle across linked destinations: new messages, replies, edits, deletes, and reactions.
- Role-based administration with
SuperAdmin,Admin, and one-timeRegistratoraccess. - Interactive slash-command flows for channel registration, linking, and group management.
- Per-user custom emoji avatars in bridged message headers.
- MongoDB-backed state and message mapping, without persisting message content.
- Install the bot on every server that should participate.
- Set a SuperAdmin on each server (
/set_superadminfrom a Discord server admin). - Grant Admin and/or Registrator roles where needed using
/set_adminand/set_registrator. - Register each channel that should be linked with
/register_channel. - Ensure the same user registers every channel within a link group.
- Link the channels together via
/link_channel. - Optionally attach channels to an existing group with
/link_channel_to_group. - Any group can hold an unlimited number of linked channels.
- Registrator access is temporary and expires after performing a single channel link.
Commands are exposed via Discord slash commands, each gated by the required role. Slash-command autocompletions guide the linking process and help fill in the necessary IDs. Full command reference: docs/commands.md.
- Requirements: Python 3.8+, running MongoDB instance.
- Create
.envwithDISCORD_TOKEN,MONGO_URI,MONGO_DB, andAVATAR_COLLECTION_NAME. - Legacy aliases
token,mongodb_uri, andavatar_collection_nameare still supported. - Install deps with
pip install -r requirements.txtand start the bot usingpython main.py.
- GitHub Actions deploys on every push to
masterusing .github/workflows/publish.yml. - The workflow builds
ghcr.io/denikryt/hackbridge-botand deploys it through Docker Stack using docker-stack.yml. - The production stack joins the external Docker network
infra_mongo-rs-net, matching theFeed-botdeployment model. - Required repository secrets:
DEPLOY_USER,DEPLOY_HOST,DEPLOY_SSH_PRIVATE_KEY,MONGO_URI,MONGO_DB,DISCORD_TOKEN,AVATAR_COLLECTION_NAME,LOG_FILE.