Skip to content
This repository has been archived by the owner on Aug 24, 2024. It is now read-only.

Commit

Permalink
Add a note about how to install optional charset converter dependencies
Browse files Browse the repository at this point in the history
Fixes part of reactiflux#252 and reactiflux#237.
  • Loading branch information
Throne3d committed Sep 4, 2017
1 parent 345da09 commit bb2d4e6
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ import config from './config.json';
discordIRC(config);
```

When installing the library, you may encounter an error relating to the installation of `iconv` or `node-icu-charset-detector`.
These are optional dependencies which allow you to set the target encoding of messages sent to Discord, as detailed below in the README.
Without these dependencies and the relevant setting, messages that aren't sent in UTF-8 may be corrupted when copied to Discord.

## Configuration
First you need to create a Discord bot user, which you can do by following the instructions [here](https://github.com/reactiflux/discord-irc/wiki/Creating-a-discord-bot-&-getting-a-token).

Expand Down Expand Up @@ -94,6 +98,12 @@ The `ircOptions` object is passed directly to irc-upd ([available options](https

To retrieve a discord channel ID, write `\#channel` on the relevant server – it should produce something of the form `<#1234567890>`, which you can then use in the `channelMapping` config.

### Encodings

If you encounter trouble with some characters being corrupted from some clients (particularly umlauted characters, such as `ä` or `ö`), try installing the optional dependencies `iconv` and `node-icu-charset-detector`, then adding `"encoding": "utf-8"` to your `ircOptions` object.

Further information can be found in [the installation section of irc-upd](https://github.com/Throne3d/node-irc#character-set-detection).

## Tests
Run the tests with:
```bash
Expand Down

0 comments on commit bb2d4e6

Please sign in to comment.