Install

Why is LilyWhiteBot?

 - It's open.
 - Support IRC, Telegram, Discord and Tencent QQ/ WeChat (Needs to be modified according to the WeChat handle)

Prerequisites

 - Node.js 14
 - Git
 - Vi support UTF-8

Configuration steps

 $cd ~
 $mkdir LilyWhiteBot

It will make a dir called LilyWhiteBot (I'm forking it to make it easily to config.) on your home dir.

 $cd ~/LilyWhiteBot
 $git clone https://github.com/fossifer/LilyWhiteBot.git (I'm forking it to make it easily to config.)

After you had download, change the bot config.

 $cd LilyWhiteBot
 $vi config.example.yml

Branch - Telegram Bot API

Search @BotFather on your Telegram APP, send /start before you did it.

You will recevie a message about how to use from BotFather. Send /newbot to create a new bot on Telegram.

Branch - Discord Bot API

Visit Discord Dev,after, click New Application.(Remember CLIENT ID)

Click your New Application, click add bot. Get invite link from OAuth2.

If you readed the guide of API, please keep properly token.

 $doas vi config.example.yml

And Change:

 Telegram:
 Disable: false

 IRC:
 Disable: false

It will able Telegram and IRC. Change the following content is taken from the source file:

IRC:

  bot:
    server: irc.libera.chat
    nick: "SuzerainBot"                               
    userName: "SuzerainBot"
    realName: "SuzerainBot"
    channels: ["#hi", "#ircnow"]   
    sasl: true  
    sasl_password: "Nickname Passwd"

It will set a bot nickname called SuzerainBot running on Libera and will auto join #hi,#ircnow channels use password Nickname Passwd for login.

The configuration methods for Telegram and Discord are also the same, but please be careful not to configure Telegram Proxy. And DO NOT change anything of QQ, you can't running true at now.

Example:

 Telegram:
   disabled: false                        
   bot:
     name: "SuzerainBot"                              
     token: "123456789:q234fipjfjaewkflASDFASjaslkdf" 
     timeout: 30                            
     limit: 100          

 Discord:
   disabled: false                           
   bot:
     token: "ODk0NzYyNDU0NjkxNzc0NDY0.YVuueQ.t9xUJCw_tWs1iv82pCbaht8KFSY"
   options:
     nickStyle: nickname                    
     useProxyURL: false                      
     relayEmoji: false #for save system resources, not forward emoji pictures, only forward the corresponding emoji

Group Configuration

After setting the basic information of the robot correctly, we need specify which groups/channels the bot will work in.

Search groups: on config.yml.

Usage:

 irc/#Channel
 telegram/-Group ID
 discord/Channel ID NOT Server ID

Example:

 - ['irc/#hi', 'telegram/-12345678']

It will enable a bridge from irc channel #hi to a Telegram Group of id is 12345678.

Running Bot

when you've done all the work, please:

 $cd ~
 $cd ~/LilyWhiteBot/
 $doas mv config.example.yml config.yml
 $doas npm install
 $doas node main.js

By now, it should have started working. Congratulate!