How to configure a discord->irc gateway on a Raspberry Pi

Downloading BitlBee

First of all, we need to download BitlBee, the open source IRC to other chat networks gateway.

pi@raspberrypi:~ $ sudo apt-get install bitlbee-dev

After you have installed bitlbee, you can edit the config file at /etc/bitlbee/bitlbee.conf
Here you can set the DaemonInterface and DaemonPort values (ip and the port of the IRC server). Start the BitlBee service using this command:

pi@raspberrypi:~ $ sudo systemctl start bitlbee

Configuring BitlBee

Now you can connect to the BitlBee server using an IRC client. When you connect, notice this channel: &bitlbee. This is the control channel. The channel is used for configuring your connections to IM platforms. First of all, you need to create your identity using this command in the control channel:

register <password>

after that, you can login to your newly created identity using

identify <password>

Now you can disconnect from your BitlBee server or examine the help command.

Compiling bitlbee-discord

We're gonna use this bitlbee-discord plugin:

pi@raspberrypi:~ $ git clone https://github.com/sm00th/bitlbee-discord/

Now, if your Raspberry doesn't have the GNU autotools installed, use the following command to install them:

pi@raspberrypi:~ $ sudo apt-get install autoconf automake libtool

When you have autotools installed, configure and install the bitlbee-discord:

pi@raspberrypi:~ $ ./autogen.sh
pi@raspberrypi:~ $ ./configure
pi@raspberrypi:~ $ make
pi@raspberrypi:~ $ sudo make install

Configuring bitlbee-discord

Hop back onto your IRC BitlBee server. You can now tie your identity to your discord account. Don't forget to identify yourself first:

identify <password>

Use the following command to login to your discord account

account add discord <email> <password>
account discord on

After that, your Discord friends that are online should appear connected to the control channel. Don't worry, they appear there just for information. You can now normally open an DM dialog using /query <username>

Adding your channels

Use this command in the control channel to list all the Discord channels of your Discord guilds:

chat list discord

Something like this should appear:

<root> Index  Title                 Topic
<root>     1  Server.main           Server/main
<root>     2  Your.chat             Your Discord/chat
<root>     3  Some.channel          Some server/channel

So for instance if you want to create a channel named #server-main that corresponds to the main channel of the guild named Server, use this command:

chat add discord !1 #server-main

You can then join the channel using:

/join #server-main

Or configure auto join:

chan #mydiscordchannel set auto_join true