simple and asynchronous matrix appservice framework
Find a file
git-bruh d81fe7199d
log
2021-02-06 12:26:36 +05:30
cogs update 2021-01-02 18:28:58 +05:30
utils add script to migrate emotes 2021-02-01 11:52:56 +05:30
LICENSE Create LICENSE 2020-11-11 11:48:31 +00:00
main.py log 2021-02-06 12:26:36 +05:30
README.md log 2021-02-06 12:26:36 +05:30
requirements.txt requirements 2021-01-24 11:59:15 +05:30

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 generate config.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"
    }
}
  • Logs are saved to the bot.log file in $PWD.

  • Normal Discord bot functionality like commands can be added to the bot via cogs, example here.

  • Replace guild.emojis with self.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

TODO

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)