/wl-bot

A bot used to forward messages between Telegram and QQ.

Primary LanguageHaskellBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

wl-bot

This is a program used to link groups between Telegram and QQ, written in Haskell.

How does it work

The program uses the coolq-http-api to communicate with Coolq, and get updates from Telegram through Webhook.

What can it do

  • Forward messages

How to use this bot

  1. Download the pre-build binary file at latest release.

  2. Create config.json under the same directory as wl-bot-exe:

    {
       "groups":[
          [QQgroupidhere, TGgroupidhere]
       ],
       "tgbotToken":"",
       "cqServer":"",
       "port":
    }

    For example:

    {
       "groups":[
          [124234231, -12514514]
          [434235235, -14353453]
       ],
       "tgbotToken":"telegramtokenhere",
       "cqServer":"http://localhost:5700",
       "port":8443
    }
  3. Enable Coolq Http API plugin, set the plugin:

    "post_message_format": "array"
    "post_url": "http://yoursever:port/cq/"
  4. Set Telegram webhook: Open url from browser: https://api.telegram.org/botyourbottoken/setWebhook?url=https://yourserver:port/telegram/

  5. Run wl-bot-exe:

    ./wl-bot-exe