Quick install¶
This is a quick installation guide for an administrator to configure and deploy TeleIRC. TeleIRC configuration is divided into these steps:
- Create a Telegram bot
- Configure IRC channel
- Configure and run TeleIRC
Create a Telegram bot¶
Note
TeleIRC DOES NOT support channels, only groups. Read more about channels vs groups here.
Create a new Telegram bot to act as a bridge from the Telegram side. The bot API provides a token key for the bot. Use the bot to discover the unique chat ID of your Telegram group.
Create bot with BotFather¶
- Start new message to @BotFather user on Telegram
- Send
/start
to @BotFather [1] - Follow instructions to create new bot (e.g. name, username, description, etc.)
- Receive token key for new bot (used to access Telegram API)
- (REQUIRED) Set
/setprivacy
to DISABLED (so bot can see messages) [2] - Add bot to Telegram group you plan to bridge
Optional configuration changes¶
- Set description or profile picture for your bot with @BotFather
- Block your bot from being added to more groups (
/setjoingroups
)
Configure IRC channel¶
There is no required configuration for an IRC channel. However, there are recommendations for best practices:
- Register your channel
- Give permanent voice to your bridge bot via ChanServ (most networks use the
+V
flag) - Example: On freenode,
/query ChanServ ACCESS #channel ADD my-teleirc-bot +V
- Example: On freenode,
- Give permanent voice to your bridge bot via ChanServ (most networks use the
Configure and run TeleIRC¶
This section explains how to configure and install TeleIRC itself.
Install dependencies¶
- Clone the repository (
git clone https://github.com/RITlug/teleirc.git
) - Install dependencies (
yarn
)
Configuration¶
TeleIRC uses dotenv to manage API keys and settings.
The config file you use is a .env
file.
Copy the example file to a production file to get started (cp env.example .env
).
Edit the .env
file with your API keys and settings.
See also
See Config file glossary for detailed information.
Relay Telegram picture messages via Imgur¶
TeleIRC retrieves picture messages via the Telegram API. By default, picture messages from Telegram are sent to IRC through Imgur. See context for why Imgur is enabled by default.
Note
By default, TeleIRC uses the generic Imgur API key. Imgur highly recommends registering each TeleIRC bot.
To add Imgur support, follow these steps:
- Create an Imgur account
- Register your bot with the Imgur API
- Select OAuth2 without callback option
- Put client ID into
.env
file
[1] | @BotFather is the Telegram bot for creating Telegram bots |
[2] | Privacy setting must be disabled for TeleIRC bot to see messages in the Telegram group. By default, bots cannot see messages unless a person uses a command to interact with the bot. Since TeleIRC forwards all messages, it needs to see all messages. Messages are not stored or tracked by TeleIRC. |