Giter VIP home page Giter VIP logo

discord-irc's Introduction

Coverage Status

Connects Discord and IRC channels by sending messages back and forth.

Example

discord-irc

Installation and usage

Note: discord-irc requires Node.js version 12 or newer, as it depends on discord.js. Future versions may require newer Node.js versions, though we should support active releases.

Before you can run discord-irc you need to create a configuration file by following the instructions here. After you've done that you can replace /path/to/config.json in the commands below with the path to your newly created configuration file - or just config.json if it's in the same directory as the one you're starting the bot from.

When you've done that you can install and start the bot either through npm:

$ npm install -g discord-irc
$ discord-irc --config /path/to/config.json

or by cloning the repository:

In the repository folder:
$ npm install
$ npm run build
$ npm start -- --config /path/to/config.json # Note the extra double dash

It can also be used as a module:

import discordIRC from 'discord-irc';
import config from './config.json';
discordIRC(config);

Docker

As an alternative to running discord-irc directly on your machine, we provide a Docker container image. After creating a configuration file, you can fetch the image from Docker Hub and run it with the following command:

docker run -v /path/to/config:/config/config.json discordirc/discord-irc

If you've checked out the repository already, you can build the Docker image locally and run that instead:

docker build -t discord-irc .
docker run -v /path/to/config:/config/config.json discord-irc

Note that the path to the config file on the host (/path/to/config) must be a valid absolute path to a config file. Otherwise, you may get the error "illegal operation on a directory".

Configuration

First you need to create a Discord bot user, which you can do by following the instructions here.

Example configuration

[
  // Bot 1 (minimal configuration):
  {
    "nickname": "test2",
    "server": "irc.testbot.org",
    "discordToken": "botwantsin123",
    "channelMapping": {
      "#other-discord": "#new-irc-channel"
    }
  },

  // Bot 2 (advanced options):
  {
    "nickname": "test",
    "server": "irc.bottest.org",
    "discordToken": "botwantsin123",
    "autoSendCommands": [ // Commands that will be sent on connect
      ["PRIVMSG", "NickServ", "IDENTIFY password"],
      ["MODE", "test", "+x"],
      ["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
      "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
      "port": "6697", // 6697 by default
      "secure": true, // enable SSL, false by default
      "sasl": true, // false by default
      "username": "test", // nodeirc by default
      "password": "p455w0rd" // empty 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)
      "webhookAvatarURL": "https://robohash.org/{$nickname}" // Default avatar to use for webhook messages
    },
    "ircNickColor": false, // Gives usernames a color in IRC for better readability (on by default)
    "ircNickColors": ['light_blue', 'dark_blue', 'light_red', 'dark_red', 'light_green', 'dark_green', 'magenta', 'light_magenta', 'orange', 'yellow', 'cyan', 'light_cyan'], // Which irc-upd colors to use
    "parallelPingFix": true, // Prevents users of both IRC and Discord from being mentioned in IRC when they speak in Discord (off by default)
    // Makes the bot hide the username prefix for messages that start
    // with one of these characters (commands):
    "commandCharacters": ["!", "."],
    "ircStatusNotices": true, // Enables notifications in Discord when people join/part in the relevant IRC channel
    "ignoreUsers": {
      "irc": ["irc_nick1", "irc_nick2"], // Ignore specified IRC nicks and do not send their messages to Discord.
      "discord": ["discord_nick1", "discord_nick2"], // Ignore specified Discord nicks and do not send their messages to IRC.
      "discordIds": ["198528216523210752"] // Ignore specified Discord ids and do not send their messages to IRC.
    },
    // List of webhooks per channel
    "webhooks": {
      "#discord": "https://discord.com/api/webhooks/id/token"
    }
  }
]

The ircOptions object is passed directly to irc-upd (available options).

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.

Webhooks

Webhooks lets you override nicknames and avatars, so messages coming from IRC can appear as regular Discord messages:

discord-webhook

To enable webhooks, follow part 1 of this guide to create and retrieve a webhook URL for a specific channel, then enable it in discord-irc's config as follows:

  "webhooks": {
    "#discord-channel": "https://discord.com/api/webhooks/id/token"
  }

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. The bot will produce a warning when started if the IRC library is unable to convert between encodings.

Further information can be found in the installation section of irc-upd.

Tests

Run the tests with:

$ npm test

Style Guide

discord-irc follows the Airbnb Style Guide. ESLint is used to make sure this is followed correctly, which can be run with:

$ npm run lint

discord-irc's People

Contributors

andebor avatar anirbanmu avatar dependabot[bot] avatar doppins-bot avatar dustinlacewell avatar ekmartin avatar fiaxhs avatar fishyfrogface avatar gdude2002 avatar imnotjames avatar johnmh avatar kurocon avatar kweaver87 avatar mathiasose avatar mikaela avatar miosame avatar mraof avatar nickmccurdy avatar nsavch avatar qyriad avatar rahatarmanahmed avatar ratismal avatar rce avatar rdb avatar sanqui avatar sparxysys avatar temeez avatar throne3d avatar vilkku avatar williamjacksn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

discord-irc's Issues

[Enhancement] Grab userlist

I've been using this for one of our communities and it's working well, so far.

It would be neat if we could grab the list of users on the other platform, so Discord users would not have to log in to IRC to see who is online, and vice versa.

Unexpected token /

[noah@Miyuki discord-irc]$ npm start -- --config ../config.json 

> [email protected] start /home/noah/dis-irc-stable/discord-irc
> node dist/index.js "--config" "../config.json"

module.js:443
    throw err;
    ^

SyntaxError: /home/noah/dis-irc-stable/config.json: Unexpected token /
    at Object.parse (native)
    at Object.Module._extensions..json (module.js:440:27)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:311:12)
    at Module.require (module.js:366:17)
    at require (module.js:385:17)
    at run (/home/noah/dis-irc-stable/discord-irc/dist/cli.js:30:20)
    at Object.<anonymous> (/home/noah/dis-irc-stable/discord-irc/dist/index.js:23:19)
    at Module._compile (module.js:425:26)
    at Object.Module._extensions..js (module.js:432:10)

This appears to occur with any config file, whether it's in the same or a different directory, regardless of contents.
Remains the same whether it is installed with npm or a cloned repo.

Node version 5.0.0 and npm version 3.3.6, I made sure to upgrade them as they were old and caused their own issues.

Sends empty message to IRC when an attachment is added

Not sure how robust discord.js is but when someone attaches a file of any format it will just send a blank message to IRC. It would be cool to pull the name of the attachment and put something like " Attached file 'filename.ext'." if that's not possible maybe just have it say something like " Attached a file, please log into Discord to view it."

Problem starting.

Hey, I'm not able to start discord-irc.
When I do npm start -- --config config.json I get this error:

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'start',
1 verbose cli   '--config',
1 verbose cli   'config.json' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info prestart [email protected]
6 info start [email protected]
7 verbose unsafe-perm in lifecycle true
8 info [email protected] Failed to exec start script
9 verbose stack Error: [email protected] start: `node dist/index.js "config.json"`
9 verbose stack Exit status 1
9 verbose stack     at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:214:16)
9 verbose stack     at emitTwo (events.js:87:13)
9 verbose stack     at EventEmitter.emit (events.js:172:7)
9 verbose stack     at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:24:14)
9 verbose stack     at emitTwo (events.js:87:13)
9 verbose stack     at ChildProcess.emit (events.js:172:7)
9 verbose stack     at maybeClose (internal/child_process.js:818:16)
9 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
10 verbose pkgid [email protected]
11 verbose cwd C:\Users\MattiSony\node_modules\discord-irc
12 error Windows_NT 6.1.7601
13 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start" "--config" "config.json"
14 error node v4.2.3
15 error npm  v2.14.7
16 error code ELIFECYCLE
17 error [email protected] start: `node dist/index.js "config.json"`
17 error Exit status 1
18 error Failed at the [email protected] start script 'node dist/index.js "config.json"'.
18 error This is most likely a problem with the discord-irc package,
18 error not with npm itself.
18 error Tell the author that this fails on your system:
18 error     node dist/index.js "config.json"
18 error You can get their info via:
18 error     npm owner ls discord-irc
18 error There is likely additional logging output above.
19 verbose exit [ 1, true ]

Multiple Discord Channels Not Working

I have 2 instances of this bot setup. Both of them are configured to use the same Discord Bot (token). Both mapped from 1 Discord channel to 1 IRC channel. This works fine in the first Instance of discord-irc in the first Server/Channel, but in the Second Server/Channel on the Second Instance of discord-irc, messages will either not show up in the Discord channel, or show up in the First Instance of discord-irc's Channel. Messages still go properly from Discord to IRC, just not from IRC to Discord. Please note in this case, both Discord Channels have the same name.

Can't connect to IRC Server with password

Hello your Work is nice but i want to make a Discord-Twitch-Bridge with your Scripts.
may be you can add that you can connect to IRC Server where do you need an Password to connect.

I think like this in bot.js:

 _createClass(Bot, [{
    key: 'connect',
    value: function connect() {
      _winston2.default.debug('Connecting to IRC and Discord');
      this.discord.loginWithToken(this.discordToken);

      var ircOptions = _extends({
        userName: this.nickname,
        realName: this.nickname,
        channels: this.channels,
        password: this.password,
        floodProtection: true,
        floodProtectionDelay: 500,
        retryCount: 10
      }, this.ircOptions);

      this.ircClient = new _irc2.default.Client(this.server, this.nickname, ircOptions);
      this.attachListeners();
    }
  }

And this in config.json:

[
  {
    "nickname": "NICK",
    "server": "SERVER",
    "password": "PASSWORD",
    "discordToken": "TOKEN",
    //"autoSendCommands": [ // Commands that will be sent on connect 
    //  ["PRIVMSG", "NickServ", "IDENTIFY password"],
    //  ["MODE", "test", "+x"],
    //  ["AUTH", "test", "password"]
    //],
    "channelMapping": { // Maps each Discord-channel to an IRC-channel, used to direct messages to the correct place 
      "#DISCORD_CHANNEL": "#IRC_CHANNEL" // Add channel keys after the channel name 
    },
    "ircOptions": { // Optional node-irc options 
      "floodProtection": false, // On by default 
      "floodProtectionDelay": 1000 // 500 by default 
    },
    "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): 
    "commandCharacters": ["!", "."]
  }
]

Cannot find module 'discord.js'

$ node index.js --config config.json 
module.js:339
    throw err;
    ^

Error: Cannot find module 'discord.js'
    at Function.Module._resolveFilename (module.js:337:15)
    at Function.Module._load (module.js:287:25)
    at Module.require (module.js:366:17)
    at require (module.js:385:17)
    at Object.<anonymous> (/root/discordapp/node_modules/discord-irc/lib/bot.js:4:15)
    at Module._compile (module.js:435:26)
    at Object.Module._extensions..js (module.js:442:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:311:12)
    at Module.require (module.js:366:17)

Can't get bot to connect to discord

Hello,

I get nothing from Discord->IRC and keep getting an error IRC->Discord:
`info: Tried to send a message to a channel the bot isn't in: #FFPickup"

I have followed everything here and the bot comes online in discord and joins my channel in irc, when I run my config.json:

{
    "nickname": "discordRelay",
    "server": "uk.quakenet.org",
    "discordToken": "copied.over.from.app",
    "autoSendCommands": [ 
      ["MODE", "discordRelay", "+x"],
      ["AUTH", "discordRelay", "password"]
    ],
    "channelMapping": { 
      "#FFPickup": "#ff.test" 
    },
    "ircOptions": { 
      "floodProtection": false, 
      "floodProtectionDelay": 1000 
    },
    "ircNickColor": false, 

    "commandCharacters": ["!", "."]
  }

Any idea what I am missing?

Remove username from text sent to IRC

Currently the bot sends text from Discord to IRC in the format as:

" test"

I want it to just send the text as simply "test". Would this be easily configured? An IRC bot we have doesn't want to recognize commands if any text is before it.

Recognize disconnects from discord and reconnect

Sometimes the bot gets disconnected from Discord (probably by the net it's hosted off going down momentarily really) - it says it's "not in that channel" when this happens, when in reality it's just not connected at all. Once reconnected, it recognizes the channel and functions perfectly. It'd be wonderful if there could be some catch for this situation so I wouldn't have to restart the bot occasionally.

Guide

Could you write a short guide on how to get this working on a fresh vps ? A quick step by step would be awesome.

Any way to connect using SSL?

Hi

I'm trying to connect discord-irc to a bouncer which runs SSL. Is there any way to do this? I have tried using "server": "localhost:+20001" which didn't seem to work.

> discord-irc --config discord.conf
debug: Connecting to IRC and Discord
debug: Connected to Discord

and then nothing happens

Thanks,
Gachl

edit: sorry I'm stupid, I didn't look at the available options site.

First character in IRC not coloured

Colouring users is enabled. YChat turns the whole line red if you get highlighted, unless custom colours are sent in the message. Apparently, the first character (the >) isn't send with a colour code.

Obviously a minor issue.

ss 2016-08-06 at 07 12 32

Also, I would personally prefer that only the username is coloured, and the rest is set to neutral.

Can't start discord-irc

Whenever I attempt to run discord-irc, it immediately crashes.

me@my-computer:~$ discord-irc --config /path/to/config.json

/usr/local/lib/node_modules/discord-irc/node_modules/discord.js/lib/Voice/StreamIntent.js:9
f (typeof superClass !== "function" && superClass !== null) { throw new TypeEr
                                                                    ^
TypeError: Super expression must either be null or a function, not object
    at _inherits (/usr/local/lib/node_modules/discord-irc/node_modules/discord.js/lib/Voice/StreamIntent.js:9:113)
    at /usr/local/lib/node_modules/discord-irc/node_modules/discord.js/lib/Voice/StreamIntent.js:16:2
    at Object.<anonymous> (/usr/local/lib/node_modules/discord-irc/node_modules/discord.js/lib/Voice/StreamIntent.js:25:3)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/discord-irc/node_modules/discord.js/lib/Voice/VoiceConnection.js:38:21)

For future reference, I replaced my config path to /path/to/config.json for ticket purposes. I'm running Ubuntu 14.04.3 LTS. Help would be appreciated.

Imperfect Discord text handling

  1. Discord to IRC messages will cut off and not extend if they run on for too long (sometimes).
  2. Both Discord to IRC and IRC to Discord messages lack the proper formatting.
  3. IRC do not send bot-prefixed messages to Discord as one would expect.

Numbers in Front of Names in IRC - Twitch

It seems everyone's name from Discord, is appended with 2 numbers when being relayed into IRC.

Here is an example from IRC:

4:58 Discord_Bot: <04🎮 Mr McPowned> i was more curious on the bot's points
4:58 Discord_Bot: <09Shane> LOL
4:59 Discord_Bot: <09Shane> i know we can get nightbot in here
4:59 Discord_Bot: <09Shane> revlo's API is a WIP
5:03 Discord_Bot: <13Will> Your base are belong to us!

Not sure if this is specific to the Twitch IRC server, or has shown up elsewhere.
Is there any setting that can be enabled to fix this?

Mentions from IRC -> Discord

I am using a framework for my Discord Bot, and it has a regex to autoconvert @username to a mention. Passing the code for your ease of implementation.

.replace(/@[^\s]+\b/g, (o) => {
    var member = message.channel.server.members.get("username", o.substring(1));
    return member ? member.mention() : o;
});

Port channel ID transformers

Right now highlights on the form of #channel-name sent from Discord to IRC will appear as an ID instead of a channel name, should replace it with the name.

Possibility?

How possible would it be to connect to something like the twitch.tv irc servers which have oauth enabled? because this would be literally amazing if that could be worked out.

discord.js outdated

Current version: 5.1.0
Package version: 3.10.1

Note: there are a few library API changes

bummer

Looks like there are serious issues with this code and nodejs 4.4.3 - as in it wont' install.
Maybe it's nodejs. Maybe it's gyp. Maybe it's npm. Maybe it's ubuntu 15.10. I don't know.
All I know is at 8am, I started working to get this installed. It's now 11. I'm done.

Maybe you can look into the issue so that you're not losing additional future prospective users as well.

Custom formatting between Discord and IRC

It would be really cool if I could customize the format that shows between the two services.

Like, I would like to strip the nick color that is sent to IRC, or have it show as [NICK] instead of .

It would be really cool if it could just pull the rank color from Discord and use that instead of a random color.

Massive memory usage

discord-irc uses close to 140MB of RAM on my 512MB VPS.
There's only one channel mapping and not too much chatting going on.
Ubuntu version is 14.04.3 LTS, node version is 0.12.9

This is way to much.

Output of top:

discord-irc memory usage

For my config.json, refer to #25

Recurring Error During Very Busy Period

Hi guys,

Firstly thanks for making my life so much easier. It's made our transition to Discord much smoother than I could have hoped for.
So we had a special event last night with unusually high usage for what we're used to (700+ active in Discord, 200+ active in IRC, average 140 messages per minute). This particular error reocurred through the 12 hours. Are you able to shed any light on it?

Regards,
Andy

TypeError: Cannot read property 'requestedDisconnect' of null
at Client.send (/home/neonblue/Node/lib/node_modules/discord-irc/node_modules/irc/lib/irc.js:932:19)
at /home/neonblue/Node/lib/node_modules/discord-irc/node_modules/irc/lib/irc.js:1072:22
at Array.forEach (native)
at /home/neonblue/Node/lib/node_modules/discord-irc/node_modules/irc/lib/irc.js:1071:25
at Array.forEach (native)
at Client._speak (/home/neonblue/Node/lib/node_modules/discord-irc/node_modules/irc/lib/irc.js:1069:12)
at Client.say (/home/neonblue/Node/lib/node_modules/discord-irc/node_modules/irc/lib/irc.js:1056:10)
at /home/neonblue/Node/lib/node_modules/discord-irc/dist/bot.js:199:32
at Bot.sendToIRC (/home/neonblue/Node/lib/node_modules/discord-irc/dist/bot.js:210:11)
at Client. (/home/neonblue/Node/lib/node_modules/discord-irc/dist/bot.js:126:16)
/home/neonblue/Node/lib/node_modules/discord-irc/node_modules/irc/lib/irc.js:932
if (!this.conn.requestedDisconnect) {

show who is on IRC from discord and vice versa

you should add commands so people on discord can see who is on IRC and vice versa, it would also be nice to see IRC nick changes, joins, quits, and parts from discord, maybe make it an option to show or hide such messages

Unable to Connect to Twitch

Looking over DEBUG, I never see it send the extra option "PASS":

17 Apr 13:43:03 - Sending irc NICK/USER
17 Apr 13:43:03 - SEND: NICK ircusername
17 Apr 13:43:04 - SEND: USER ircusername 8 * ircusername
17 Apr 13:43:13 - Connection got "end" event
17 Apr 13:43:13 - Connection got "close" event
17 Apr 13:43:13 - Disconnected: reconnecting
17 Apr 13:43:13 - Waiting 10000ms before retrying
CyclingPingTimer 0: server silent for too long, let's send a PING
17 Apr 13:43:19 - SEND: PING 1
17 Apr 13:43:19 - Network error: Error: This socket has been ended by the other party
17 Apr 13:43:23 - Sending irc NICK/USER
17 Apr 13:43:24 - SEND: NICK ircusername
17 Apr 13:43:24 - SEND: USER ircusername 8 * ircusername

I am specifying the option in the config like so:

[
{
"nickname": "ircusername",
"server": "irc.twitch.tv",
"discordEmail": "email@address",
"discordPassword": "password",
"autoSendCommands": [ // Commands that will be sent on connect
["PASS", "oauth:password"]
],
"channelMapping": { // Maps each Discord-channel to an IRC-channel, used to$
"#general": "#ircchannel" // Add channel keys after the chan$
},
"ircOptions": { // Optional node-irc options
"debug": "true",
"showErrors": "true",
"retryDelay": "10000"
}
}
]

I am able to connect fine over telnet, however, you must send USER, PASS, then NICK:

[user@host ~]$ telnet irc.twitch.tv 6667
Trying 52.26.71.250...
Connected to irc.twitch.tv.
Escape character is '^]'.
USER ircusername 8 * ircusername
PASS oauth:password
NICK ircusername
:tmi.twitch.tv 001 ircusername :Welcome, GLHF!
:tmi.twitch.tv 002 ircusername :Your host is tmi.twitch.tv
:tmi.twitch.tv 003 ircusername :This server is rather new
:tmi.twitch.tv 004 ircusername :-
:tmi.twitch.tv 375 ircusername :-
:tmi.twitch.tv 372 ircusername :You are in a maze of twisty passages, all alike.
:tmi.twitch.tv 376 ircusername :>

How can this connection be accomplished using this library? Thanks in advance.

Reconnect on ping timeout

discord (~discord@ip) has quit (Ping timeout: 378 seconds) :(

node is still running on screen, but has quit irc- would be nice if it could reconnect to the irc channel/server.

Perhaps printing things to console such as errors and whatnot help to see what happened / make it more visible that it's still online and doing things?

IRC Color code

Any way to have discord-irc to remove color code from message?

Support for Per Server Nicknames

Discord has a new feature, that allows per server nicknames. When I set a server specific nickname, the bot still posts to IRC with my global nickname, not the nickname I had on the server that the bot is on.

Direct Messages from IRC to Discord Channel

Hi,

would it be possible to add a feature to activate that mentioned title issue?
I would like to use direct message at the irc level and present this into a discord channel.

thanks in advance.

Discord-IRC sends messages in one direction, not both.

I've successfully got the bot to appear online in Discord and join in IRC, but the first bridge I tried would only send messages from IRC to Discord, but not the other way around. I tested with a new bridge with another channel and server, but that one only sends messages from Discord to IRC, and again, not the other way around. Sometimes, it will send both ways, but it doesn't consistently happen. I can't seem to find what causes this, very confused.

Turned 2k messages into 66k discord messages?

Soo I was able to accidentally spam my irc channel with 2000 messages within 10 seconds(oops) and somehow discord-irc tried to send it 66,006 times within 15 minutes to discord, I know this because one of the Discord devs told me about it, just wanted you to know.

Discord-irc crashes when unbanning in IRC

I just cleared out my ban list on IRC, and it made the bridge crash. The bridge crashes with:

/usr/lib/node_modules/discord-irc/node_modules/irc/lib/irc.js:845
                        throw err;
                        ^

TypeError: Cannot read property 'filter' of undefined
    at chanModes (/usr/lib/node_modules/discord-irc/node_modules/irc/lib/irc.js:296:37)
    at /usr/lib/node_modules/discord-irc/node_modules/irc/lib/irc.js:315:25
    at Array.forEach (native)
    at Client.<anonymous> (/usr/lib/node_modules/discord-irc/node_modules/irc/lib/irc.js:266:26)
    at emitOne (events.js:96:13)
    at Client.emit (events.js:188:7)
    at iterator (/usr/lib/node_modules/discord-irc/node_modules/irc/lib/irc.js:842:26)
    at Array.forEach (native)
    at Socket.handleData (/usr/lib/node_modules/discord-irc/node_modules/irc/lib/irc.js:837:15)
    at emitOne (events.js:96:13)

it seems to be unable to parse the unban messages.

No way to login with a token

There currently doesn't appear to be a way to login to discord with a token on an API application account. :/

Changing bot-user Avatar with command

the discord-js docu says, (the command %docs client.setAvatar -g on node_discord-js @ discord-api server)

setAvatar(avatar, callback) - Sets the avatar of the client
• avatar - Base64 Resolvable, new avatar of the client
• callback - function taking the following:
    • error - error if any occurred

is there a way to use this in a discord-irc command?

Where is config.json?

Apologies, I've tried searching around this git, creating my own config.json but I get nothing. Can anyone help?

Crashing on http:// in irc channel

Whenever someone links to an http site in discord, the bot crashes.

/usr/lib/node_modules/discord-irc/node_modules/discord.js/lib/Util/Cache.js:1 ],old[this[discrimS]]);if(item){var index=this.indexOf(item);Object.assign(thi ^ TypeError: undefined is not a function at Cache.update (/usr/lib/node_modules/discord-irc/node_modules/discord.js/lib/Util/Cache.js:1:2168) at WebSocket.websocket.onmessage (/usr/lib/node_modules/discord-irc/node_modules/discord.js/lib/Client/InternalClient.js:64:439) at WebSocket.onMessage (/usr/lib/node_modules/discord-irc/node_modules/discord.js/node_modules/ws/lib/WebSocket.js:418:14) at WebSocket.emit (events.js:110:17) at Receiver.ontext (/usr/lib/node_modules/discord-irc/node_modules/discord.js/node_modules/ws/lib/WebSocket.js:816:10) at /usr/lib/node_modules/discord-irc/node_modules/discord.js/node_modules/ws/lib/Receiver.js:477:18 at Receiver.applyExtensions (/usr/lib/node_modules/discord-irc/node_modules/discord.js/node_modules/ws/lib/Receiver.js:364:5) at /usr/lib/node_modules/discord-irc/node_modules/discord.js/node_modules/ws/lib/Receiver.js:466:14 at Receiver.flush (/usr/lib/node_modules/discord-irc/node_modules/discord.js/node_modules/ws/lib/Receiver.js:340:3) at Receiver.opcodes.1.finish (/usr/lib/node_modules/discord-irc/node_modules/discord.js/node_modules/ws/lib/Receiver.js:482:12

Kick people in IRC through discord?

Is it possible to kick someone through discord that's in IRC? I've enabled command characters, however it's sending the ! or . along with the command. The bot has ops.

Thanks!

Bot seems to stop working randomly at some point

I'm running the bot on a Ubuntu 14.04 server using upstart.

At some point, the bot just seems to stop working. It does not crash at that point, it just stops sending messages. I'm also gonna try to figure out what's causing this myself, however I figured you might want to know.

I'm the third person of our discord/irc trying to run this and sooner or later we all ran into this issue.

What channel to put for discord?

I had my original server working then accidentally deleted it. I configured a new install (with the new version) and I'm confused to what to put for: "#other-discord":

I've tried the channel name (#general), and it says
info: Tried to send a message to a channel the bot isn't in: #general

I've registered for the API, converted it to a bot, now I'm confused. can you please help?

thanks!

cannot auth bot on irc

on the irc network i use there is a simple command to auth a user
/authserv auth username password

how do i configure the automessages to do exactly that? none of the below mentioned actualy authenticated the bot.

["AUTHSERV", "auth username password"]
["AUTHSERV", "auth", "username password"]
["AUTHSERV", "auth", "username", "password"]
["AUTHSERV auth", "username", "password"]
["AUTHSERV auth username", "password"]
["AUTHSERV auth username password"]

no errors apearing except for the last entry which gives a 421 unknown command

Support for multi-server channels

As a client, I want to be able to 'map' channels belonging to multiple different discord servers instead of a single discord server so that I can map across multiple discord servers per account.

Gitter support?

This is a long shot, but I also use gitter-irc-bot which, unlike discord-irc, doesn't support multiple inputs and outputs and doesn't have a bunch of the discord-irc protocols.

If the IRC and Discord logic aren't mixed too much, adding support for gitter based on the gitter-irc-bot code (MIT, also in js) shouldn't be too hard. Thoughts?

Discord->IRC stops working after a while, IRC->Discord sill working

Hi,

while the relay works right after installation and a specific period of time afterwards (worked for at least 30 minutes, didn't measure time exactly), at some point message sent from Discord won't appear in in the IRC channel anymore.
The other way around still works, however

Example video: http://gfycat.com/OffensiveTalkativeFiddlercrab

The terminal doesn't show any errors (besides a "nosuchchannel" error that comes from the "mode test +x" command right after joining, but I doubt that's related since everything works at first).

Channel permissions for the bot should be fine.

My config:

[
 // Bot 2 (advanced options):
  {
    "nickname": "discordion",
    "server": "irc.rizon.net",
    "discordEmail": "[email protected]",
    "discordPassword": "123",
    "autoSendCommands": [ // Commands that will be sent on connect
      ["PRIVMSG", "NickServ", "IDENTIFY 123"],
      ["MODE", "test", "+x"]
      // ["AUTH", "test", "password"]
    ],
    "channelMapping": { // Maps each Discord-channel to an IRC-channel, used to$
      "#irc-relaychan": "#vurelaytest" // Add channel keys after the chan$
    },
    "ircOptions": { // Optional node-irc options
      "floodProtection": true, // On by default
      "floodProtectionDelay": 500 // 500 by default
    },
    // Makes the bot hide the username prefix for messages that start
    // with one of these characters (commands):
    "commandCharacters": ["!"]
  }
]

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.