Code Monkey home page Code Monkey logo

matrix-appservice-discord's Introduction

Matrix Discord Bridge

A bridge between Matrix and Discord. Currently the bridge is in Beta and quite usable for everyday bridging, with one or two bugs cropping up.

Screenshot of Riot and Discord working together

Helping out

Build Status

PRs

PRs are graciously accepted, so please come talk to us in #discord-bridge:matrix.org about any neat ideas you might have. If you are going to make a change, please merge it with the develop branch :).

Issues

You can also file bug reports/ feature requests on Github Issues which also helps a ton. Please remember to include logs. Please also be aware that this is an unoffical project worked on in my (Half-Shot) spare time.

Setting up

(These instructions were tested against Node.js v6.9.5 and the Synapse homeserver)

Setup the bridge

  • Run npm install to grab the dependencies.

  • Run npm run-script build to build the typescript.

  • Copy config/config.sample.yaml to config.yaml and edit it to reflect your setup.

    • Note that you are expected to set domain and homeserverURL to your public host name. While localhost would work, it does not resolve correctly with Webhooks/Avatars.
    bridge:
    domain: "example.com"
    homeserverUrl: "https://example.com:8448"
    
  • Run node build/src/discordas.js -r -u "http://localhost:9005" -c config.yaml

  • Modify your HSs appservices config so that it includes the generated file.

    • e.g. On synapse, adding to app_service_config_files array in homeserver.yaml
    app_service_config_files:
    - "discord-registration.yaml"
    
    • Copy discord-registration.yaml to your Synapse's directory.

3PID Protocol Support

This bridge support searching for rooms within networks via the 3pid system used in clients like Riot. However, it requires a small manual change to your registration file. Change the end of discord-registration.yaml to `protocols: ["discord"]`` and restart both your bridge and synapse. Any new servers/guilds you bridge should show up in the network list on Riot and other clients.

Setting up Discord

  • Create a new application via https://discordapp.com/developers/applications/me/create
  • Make sure to create a bot user. Fill in config.yaml
  • Run npm run-script getbotlink to get a authorisation link.
  • Give this link to owners of the guilds you plan to bridge.
  • Finally, you can join a room with #_discord_guildid_channelid
    • These can be taken from the url ("/$GUILDID/$CHANNELID") when you are in a channel.
    • Riot (and other clients with third party protocol support) users can directly join channels from the room directory.
  • You can use Webhooks to make messages relayed by the bridge not nested by the bot user. This will also display the avatar of the user speaking on matrix with their messages.
    • The bot should create this automatically, but if not perform the following:
      • Enable Manage Webhooks on the role added by the bot.
      • Add the _matrix Webhook for each channel you'd like to enable this feature on.

Running the Bridge

  • For the bot to appear online on Discord you need to run the bridge itself.
  • npm start

Howto

Features and Roadmap

In a vague order of what is coming up next

  • Matrix -> Discord
    • Text content
    • Image content
    • Audio/Video content
    • Typing notifs (Not supported, requires syncing)
    • User Profiles
  • Discord -> Matrix
    • Text content
    • Image content
    • Audio/Video content
    • Typing notifs
    • User Profiles
    • Presence
    • Per-guild display names.
  • Group messages
  • Third Party Lookup
    • Rooms
    • Users
  • Puppet a user's real Discord account.
    • Sending messages
    • Direct messages
    • UI for setup
  • Rooms react to Discord updates
  • Integrate Discord into existing rooms
    • Feature
    • UI
  • Manage channel from Matrix (possibly)
    • Authorise admin rights from Discord to Matrix users
    • Topic
    • Room Name
  • Provisioning API
  • Webhooks (allows for prettier messages to discord)
  • VOIP (Hard | Unlikely to be finished anytime soon)

Contact

My Matrix ID: @Half-Shot:half-shot.uk

matrix-appservice-discord's People

Contributors

half-shot avatar anoadragon453 avatar turt2live avatar eeeeeta avatar johni0702 avatar sorunome avatar verymilan avatar ollieh avatar aaronraimist avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.