Telegram message source
** The function of Mesagisto is to forward messages to the telegram client **
Requirement
- Bot should set group privacy mode to off at botfather, otherwise your bot will not be able to access group chat messages
Deploy
- Get binary files on the Release Page (hereinafter referred to as TMS)
Note
File naming rules: TG-
-
Ensure that TMS can access the telegram server in a stable network environment (HTTP proxy may be required, see the configuration file section of this document for details)
-
Run TMS and automatically generate the default configuration file
config/tg.yml
-
Edit configuration file
config/tg.yml
# Change 'enable' to 'true' before use. enable: true # Intermediate forwarding server, message bridge. # The default is Mesagisto commonweal [Nats](https://github.com/nats-io/nats-server) Server nats: address: "nats://nats.mesagisto.org:4222" # Encryption settings cipher: # Key used for encryption key: test telegram: # Token key of TGBot, obtained from @botfather token: "114514191:IYokoiYoT4YfU_NA9NzhS5HS5oT-oJTrE" proxy: # Enable agent enable: true # Only HTTP proxy is allowed at this stage (reqwest library limit) address: "http://127.0.0.1:7890" # Stores the correspondence between Mesagisto channel and TG group. It is empty by default Manual addition is not recommended. bindings: {}
-
Start TMS:
If there is no [error] output, you can send# Give executable permission $ chmod +x ./tms # Run $ ./tms # To turn off TMS, please use Ctrl + C. don't turn it off smoothly. $ ^C
/help
to the Bot, and you will get the following reply:Mesagisto BOT supports the following commands: /about — About this project /unbind — Unbind the forwarding address of the current group /help — Display command help /status — Display status /bind — Bind the forwarding address of the current group
-
Create a telegram group, add BOT to the group, and input instructions in the group:
/bind <channel>
Matters needing attention
- No matter what the value of channel is, as long as the channels bound by each forwarding client are the same
- After changing the group privacy mode halfway, please remove the BOT from the group and restart it