This is a bot who can connect IRC channels with Telegram chat groups.
A new version of this software is now available at bigeagle branch. This version includes many great features, and is implemented based on JSON data support of telegram-cli. I highly recommad you to use the new version to get a better experience.
But I may not merge it into master branch, for it is mainly written by @bigeagle. I do not
want to take credit for the work that @bigeagle does. XD
Thanks @bigeagle again for his hard working.
- If you have not used telegram-cli before, run it first, and set the correct phone number to log in.
- Create chat groups using
create_group_chatcommand intelegram-cli, and usedialog_listto check wheather the groups are created successfully. Then exit the client. - Run
telegram-cli --json. Rundialog_listto get chat group IDs and runcontact_listto get your IDs. Then exit the client. - If you want to send telegram photos to imgur, register a imgur API id on https://api.imgur.com/oauth2/addclient , select "Anonymous usage" and fill a random URL to callback.
- Rename the
config.py.exampletoconfig.pyand edit it.- Set the
meto your user id formated asuser#<id>to avoid the bot sending duplicated message. - Set
bindingsto bind IRC channels with Telegram chats. Elements inbinddingstuple are tuples, whose first element is IRC channel and the second element is Telegram chat ID formated aschat#<id>. blacklistinircis a list which contains some nicks in IRC. The messages of these nicks won't be forwarded to Telegram.- If you want to use imgur, set
photo_store.providertoimgurand set APIclient_idinphoto_store.options.
- Set the
- Start the
telegram-cliusingtelegram -d --json -P <port>, where<port>is the telegram client port you filled inconfig.pyfile, and--jsonis needed,-dis optional. - Start the bot using
python3 teleirc.py, then it will join the channels automatically and forwards the messages between Telegram and IRC. - Add the bot as a contact on other Telegram accounts, and send
.helpto it, you can get the information about how to join a chat group, how to change the nick and etc.
This software is released with MIT License. See LICENSE file for more details.