All Projects → Half-Shot → Matrix Appservice Discord

Half-Shot / Matrix Appservice Discord

Licence: apache-2.0
A bridge between Matrix and Discord.

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Matrix Appservice Discord

Octoslack
OctoPrint plugin for Slack, Mattermost, Pushbullet, Pushover, Rocket.Chat, Discord, Riot/Matrix, & Microsoft Teams
Stars: ✭ 50 (-86.95%)
Mutual labels:  matrix, riot, discord
Matterbridge
bridge between mattermost, IRC, gitter, xmpp, slack, discord, telegram, rocketchat, twitch, ssh-chat, zulip, whatsapp, keybase, matrix, microsoft teams, nextcloud, mumble, vk and more with REST API (mattermost not required!)
Stars: ✭ 4,452 (+1062.4%)
Mutual labels:  matrix, bridge, discord
radical
Element (Riot Web) unofficially bundled as Firefox Add-on
Stars: ✭ 33 (-91.38%)
Mutual labels:  matrix, riot
twitter
A Matrix-Twitter DM puppeting bridge
Stars: ✭ 48 (-87.47%)
Mutual labels:  matrix, bridge
matrix-appservice-bridge
Bridging infrastructure for Application Services
Stars: ✭ 119 (-68.93%)
Mutual labels:  matrix, bridge
ligh7hau5
A Matrix (https://matrix.org/docs/spec/) to Fediverse / ActivityPub client / bridge. Also, some media proxying.
Stars: ✭ 26 (-93.21%)
Mutual labels:  matrix, bridge
Matrix-EmailBridge
A bridge written in Golang to receive and write emails in matrix
Stars: ✭ 101 (-73.63%)
Mutual labels:  matrix, bridge
matrix-pstn-bridge
☎️ A Matrix Puppet bridge for the public telephone network that supports a number of VoIP providers (Twillo, Vonage, etc.). Sends and receives voice and SMS.
Stars: ✭ 25 (-93.47%)
Mutual labels:  matrix, bridge
Matrix Appservice Slack
A Matrix <--> Slack bridge
Stars: ✭ 164 (-57.18%)
Mutual labels:  matrix, bridge
botdarr
Slack/Discord/Telegram/Matrix bot for accessing radarr, sonarr, and lidarr
Stars: ✭ 76 (-80.16%)
Mutual labels:  matrix, riot
telematrix
Bridge between Telegram and Matrix
Stars: ✭ 95 (-75.2%)
Mutual labels:  matrix, bridge
matrix-tag-manager
A web interface for supporting power users and their Matrix room tags.
Stars: ✭ 22 (-94.26%)
Mutual labels:  matrix, riot
matrix-sms-bridge
Matrix bridge, that allows you to bridge matrix rooms to SMS with one telephone number only.
Stars: ✭ 62 (-83.81%)
Mutual labels:  matrix, bridge
PollMaubot
A polling plugin for Riot (using maubot)
Stars: ✭ 18 (-95.3%)
Mutual labels:  matrix, riot
telegram
A Matrix-Telegram hybrid puppeting/relaybot bridge
Stars: ✭ 914 (+138.64%)
Mutual labels:  matrix, bridge
Mautrix Facebook
A Matrix-Facebook Messenger puppeting bridge
Stars: ✭ 172 (-55.09%)
Mutual labels:  matrix, bridge
matrix-puppet-slack
puppet style slack bridge for matrix
Stars: ✭ 46 (-87.99%)
Mutual labels:  matrix, bridge
matrix-puppet-facebook
a puppetted facebook bridge
Stars: ✭ 90 (-76.5%)
Mutual labels:  matrix, bridge
Element Rpm
Providing the Element messaging desktop client packaged for the Fedora, Red Hat(IBM), and OpenSUSE families of linux desktop operating systems.
Stars: ✭ 73 (-80.94%)
Mutual labels:  matrix, riot
Matrix Puppet Imessage
A two-way puppeted Matrix bridge for Apple iMessage / Messages
Stars: ✭ 109 (-71.54%)
Mutual labels:  matrix, bridge

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 Element and Discord working together

Helping out

Build Status Docker Automated build #discord:half-shot.uk

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 our spare time.

Setting up

The bridge has been tested against the Synapse homeserver, although any homeserver that implements the AS API should work with this bridge.

The bridge supports any version of Node.js >= v12.X, including all current releases.

Set up the bridge

  • Run npm install to grab the dependencies. npm may complain about peer dependencies, but you can safely ignore these.

  • Run npm run build to build the typescript into javascript.

  • 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. Please note that a self-signed SSL certificate won't work, either.
    bridge:
        domain: "example.com"
        homeserverUrl: "https://example.com"
    
  • 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.

Docker

Following the instructions above, generate a registration file. The file may also be hand-crafted if you're familiar with the layout. You'll need this file to use the Docker image.

# Create the volume where we'll keep the bridge's files
mkdir -p /matrix-appservice-discord

# Create the configuration file. Use the sample configuration file as a template.
# Be sure to set the database paths to something like this:
#  database:
#    filename: "/data/discord.db"
#    userStorePath: "/data/user-store.db"
#    roomStorePath: "/data/room-store.db"
nano /matrix-appservice-discord/config.yaml

# Copy the registration file to the volume
cp discord-registration.yaml /matrix-appservice-discord/discord-registration.yaml

# Optional: Build the container yourself (requires a git clone, and to be in the root of the project)
docker build -t halfshot/matrix-appservice-discord .

# Run the container
docker run -v /matrix-appservice-discord:/data -p 9005:9005 halfshot/matrix-appservice-discord

Metrics

The bridge supports reporting metrics via Prometheus. You can configure metrics support in the config file. The metrics will be reported under the URL provided in the registration file, on the /metrics endpoint.

3PID Protocol Support

This bridge support searching for rooms within networks via the 3pid system used in clients like Element. Any new servers/guilds you bridge should show up in the network list on Element and other clients.

Setting up Discord

  • Create a new application via https://discordapp.com/developers/applications
  • Make sure to create a bot user. Fill in config.yaml
  • Run npm run addbot 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.
    • Element (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
  • Particular configuration keys can be overridden by defining corresponding environment variables. For instance, auth.botToken can be set with APPSERVICE_DISCORD_AUTH_BOT_TOKEN.

Howto

End User Documentation

Bridging a Room

You must get an authorization link from bridge owner. You must be a server admin or get help from server admin on Discord side.

  • Invite the Matrix side bot to your room and wait for it to join.
  • On Discord side use the authorization link to invite bot to Discord server.
  • Find out a serverid and channelid for your server/channel you want to bridge. Search the web for instructions.
  • In Matrix room give command !discord bridge ServerID ChannelID
  • The bridge will ask for confirmation from the Discord server admins to complete the bridge. Once approved, you're all set.

Unbridging a Room

  • In Matrix room give command !discord unbridge

Features and Roadmap

In a vague order of what is coming up next

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

Contact

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].