diff --git a/README.md b/README.md index e475dbff776e238b744e0247f24f169571233634..0b1fc4bf812c6583d331cd61451bf05afbe92218 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,32 @@ # matrix-appservice-discord -A very WIP bridge between Matrix and Discord in node. -# Features: +A bridge between [Matrix](http://matrix.org/) and [Discord](https://discordapp.com/). +Currently the bridge is alpha quality, but is usable. + + + +## 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 build`` to build the typescript. +* Copy ``config/config.sample.yaml`` to ``config.yaml`` and edit it to reflect your setup. +* Run ``node build/discordas.js -r -u "http://localhost:9005/" -c config.yaml`` +* Modify your HSs appservices config so that it includes the generated file. + +### 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_GuildName#channelname`` + * Where the guild name has the spaces replaced with ``-``. + +## Features and Roadmap - [x] Group messages - [ ] Direct messages @@ -19,8 +44,12 @@ A very WIP bridge between Matrix and Discord in node. - [x] Audio/Video content - [x] Typing notifs - [x] User Profiles - - [ ] Presence + - [x] Presence (Synapse currently squashes presence, waiting on future spec) - [ ] Webhooks (allows for prettier messages to discord) - [ ] Rooms react to Discord updates - [ ] Manage channel from Matrix - [ ] VOIP (**Hard** | Unlikely to be finished anytime soon) + +## Contact + +My Matrix ID: [@Half-Shot:half-shot.uk](https://matrix.to/#/@Half-Shot:half-shot.uk) diff --git a/screenshot.png b/screenshot.png new file mode 100644 index 0000000000000000000000000000000000000000..68c159a3cb2f100472f6ea05a75ae672c48d8303 Binary files /dev/null and b/screenshot.png differ diff --git a/src/discordbot.ts b/src/discordbot.ts index fb0146374007e2cd6e4414d1406f49a618e2089c..0bbf5f12107950c5cae47b3effe9adedfe13080e 100644 --- a/src/discordbot.ts +++ b/src/discordbot.ts @@ -45,7 +45,7 @@ export class DiscordBot { } const channel = guild.channels.find((c) => { - return ((c.id === room || c.name.toLowerCase().replace(/ /g, "-") === room.toLowerCase() ) && c.type === "text"); + return ((c.id === room || c.name.toLowerCase() === room.toLowerCase() ) && c.type === "text"); }); if (channel === null) { return Promise.reject(`Channel "${room}" not found`);