NodeJS implementation of a Telegram <=> IRC bridge for use with any IRC channel and Telegram group
4.6K
NodeJS implementation of a Telegram <=> IRC bridge for use with any IRC channel and Telegram group
This project was written by Mark Repka to help bridge communication between RITlug's IRC channel with our Telegram group. The project is a lightweight NodeJS application. This is also being used in various IRC channels and Telegram groups than just RITlug.
A public Telegram supergroup and IRC channel are available for you to see it live in action. This is also where our developers and community hang out as well.
Ask any of our successful users!
In order to use this bridge, you will need several pieces of information. This guide is broken up into Telegram, teleirc, and IRC sections.
For the Telegram side, you will need to create a new Telegram bot that will sit inside your Telegram group. You will need to do a little configuration and information gathering with the bot.
/start Telegram message to the @BotFather, the Telegram bot for creating Telegram bots./newbot command in a chat window with BotFather. You will then be prompted to enter a bot name. Once you have done this, you will get a bot token from the BotFather for accessing the Telegram API. Make note of the token for later configuration./setprivacy command to the BotFather, specify which bot this command is for, then disable the privacy so the bot receives all messages sent in the group chat.Now that you have a bot created, have its Telegram API token, and have it in your group, you can start using this bridge.
To get teleirc working, you will need a server to run it on and a recent version of Docker installed.
docker run -d --name teleirc --restart always \
-e TELEIRC_TOKEN="000000000:AAAAAAaAAa2AaAAaoAAAA-a_aaAAaAaaaAA" \
-e IRC_CHANNEL="#channel" \
-e IRC_BOT_NAME="teleirc" \
-e IRC_BLACKLIST="CowSayBot,SomeOtherBot" \
-e TELEGRAM_CHAT_ID="-0000000000000" \
bmamlin/teleirc
TELEIRC_TOKEN: Private API key for Telegram botIRC_BLACKLIST: Comma-separated list of IRC nicks to ignore (default: "")IRC_BOT_NAME: Nickname for your bot to use on IRCIRC_CHANNEL: IRC channel you want your bot to joinIRC_PREFIX: Text displayed before Telegram name in IRC (default: <)IRC_SERVER: IRC server you wish to connect to (default: irc.freenode.net)IRC_SUFFIX: Text displayed after Telegram name in IRC (default: >)MAX_MESSAGES_PER_MINUTE: Maximum rate at which to relay messages (default: 20)SHOW_ACTION_MESSAGE: Relay action messages (default: true)SHOW_JOIN_MESSAGE: Relay join messages (default: false)SHOW_KICK_MESSAGE: Relay kick messages (default: false)SHOW_LEAVE_MESSAGE: Relay leave messages (default: false)TELEGRAM_CHAT_ID: Telegram chat ID of the group you are bridging (how do I get this?)Alternatively, if you start up the bot with no Telegram chat ID set, it will sit waiting for messages to be sent to it. If you invite the bot to your group chat, you should see a "Debug TG" message with some information about the invite that was sent. One of the fields here will be the chatId. This is the value that needs to be put in the config object. Be careful not to get the user ID of a specific user when reading these messages.
There is not real configuration needed on the IRC side, as IRC is generally very open. It might be a good idea to register the channel you are using.
Want to have your name added to the list in this README? Let us know you're using teleirc too! Submit an issue against this repo with the following info:
Please note, to be added, your group must not discuss / contain inappropriate or explicit content.
Licensed under the MIT License. If you're hacking on teleirc, we'd love to see you bring your improvements back upstream!
Content type
Image
Digest
Size
187 MB
Last updated
almost 10 years ago
docker pull burke/teleirc