xmpp-discord-bridge#
xmpp-discord-bridge's goal is to be a highly integrated bridge between XMPP and Discord.
Features#
- Uni-directional bridging of Discord reactions to XMPP: Currently without XEP-0424, but with a "compat" mode
- Bi-directional bridging of media using Webhook embeds and OOB data
- Uni-directional bridging of Discord presence to XMPP
- Puppetering support on the side of XMPP
- Automatic webhook creation
- Uni-directional sync of the Discord channel's topic
- XMPP Avatar spoofing on the Discord side
- Support for proxying media sent via Discord (With this miniproxy (Mirror))
Install using pipx#
git clone https://codeberg.org/queer-spark/xmpp-discord-bridge.git
cd xmpp-discord-bridge
pipx install .
Create and edit ~/config.toml. Refer to example.toml for options.
Build Dockerfile#
Navigate to the repository root and run the following command (Note that you can substitute podman with docker):
podman build -t xmpp-discord-bridge:latest -f contrib/Dockerfile .
XMPP#
In order for the bridge to work, it needs to have an affiliation of owner before joining. Going off of the example.toml, it would have the JID of bot@discord.example.com.
The virtual users that follow will be automatically added to the room with an affiliation
of member.
Discord#
(based upon https://github.com/42wim/matterbridge/wiki/Discord-bot-setup)
Create Bot#
You need to setup a "Bot" on Discord. Go here and click "New Application".
Then give your bot a name. Click "Create". On the next screen, you can optionally set an Avatar Icon for your app and description.
Next, click on "Bot" on the left-hand menu. Then click "Add Bot", then "Yes Do It".
On the "Bot" screen, click "Reset Token" and "Yes. Do It!". Then click "Copy" to copy it. Then paste it to "discord_token" in your config.toml.
Optional: Here, you can also toggle if the bot is public, which will allow others to invite it to their servers.
Make sure to also toggle the "Server Members Intent" and "Message Content Intent" options further down under "Privileged Gateway Intents" to allow the bot to see the member list.
Invite Bot#
Now it's time to invite your bot to your server. Don't worry about your bot being started for this next step. On the left-hand menu click "OAuth2" and copy the Client ID into this URL then navigate to it.
https://discordapp.com/oauth2/authorize?&client_id=YOUR_CLIENT_ID_HERE&scope=bot&permissions=536870912
The "permissions=536870912" at the end of the URL corresponds to the "Manage Webhooks" permission. It is required for the bridge to work correctly.
Discord will ask you which guild to invite it to. Select the guild then Authorize it.
License#
See ./LICENSE