1.6 KiB
1.6 KiB
matrix-discord-bridge
A simple non-puppeting bridge between Matrix and Discord written in Python.
Installation
pip install -r requirements.txt
Usage
-
Run
main.py
to generateconfig.json
-
Edit
config.json
{
"homeserver": "https://matrix.org",
"username": "@name:matrix.org",
"password": "my-secret-password",
"token": "my-secret-token",
"discord_prefix": "my-command-prefix", # Prefix for Discord commands
"bridge": {
"channel_id": "room_id", # Bridge multiple channels and rooms
"channel_id2": "room_id2"
}
}
-
Normal Discord bot functionality like commands can be added to the bot via cogs, example here.
-
Replace
guild.emojis
withself.discord_client.emojis
(Callbacks()
,process_message()
) to make the Discord bot use emojis from ALL it's guilds.
NOTE: Privileged Intents must be enabled for your Discord bot.
Screenshots
What Works
- Sending messages
- Discord webhooks (with avatars)
- Attachments (Converted to URLs)
- Typing status (Not very accurate)
- Redacting messages
- Editing messages
- Replies
- Bridging multiple channels/rooms
:emote:
in Matrix message converted to Discord emotes- Discord emotes bridged as inline images (Works on Element Web, Fluffychat)