diff --git a/README.md b/README.md index 6954e5b4..6134b419 100644 --- a/README.md +++ b/README.md @@ -64,12 +64,23 @@ First you need to create a Discord bot user, which you can do by following the i ["AUTH", "test", "password"] ], "channelMapping": { // Maps each Discord-channel to an IRC-channel, used to direct messages to the correct place - "#discord": "#irc channel-password" // Add channel keys after the channel name + "#discord": "#irc channel-password", // Add channel keys after the channel name + "1234567890": "#channel" // Use a discord channel ID instead of its name (so you can rename it or to disambiguate) }, "ircOptions": { // Optional node-irc options "floodProtection": false, // On by default "floodProtectionDelay": 1000 // 500 by default }, + "format": { // Optional custom formatting options + // Patterns, represented by {$patternName}, are replaced when sending messages + "commandPrelude": "Command sent by {$nickname}", // Message sent before a command + "ircText": "<{$displayUsername}> {$text}", // When sending a message to IRC + "urlAttachment": "<{$displayUsername}> {$attachmentURL}", // When sending a Discord attachment to IRC + "discord": "**<{$author}>** {$withMentions}" // When sending a message to Discord + // Other patterns that can be used: + // {$discordChannel} (e.g. #general) + // {$ircChannel} (e.g. #irc) + }, "ircNickColor": false, // Gives usernames a color in IRC for better readability (on by default) // Makes the bot hide the username prefix for messages that start // with one of these characters (commands): @@ -81,6 +92,8 @@ First you need to create a Discord bot user, which you can do by following the i The `ircOptions` object is passed directly to node-irc ([available options](http://node-irc.readthedocs.org/en/latest/API.html#irc.Client)). +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. + ## Tests Run the tests with: ```bash